Tag Archives: conversion

conversion of #xml with attributes to #json with attributes

how can you convert #xml with attributes to #json with attributes

these three xml converters give three different answers

and represent XML attributes as either

  • _attr
  • @attr
  • -attr

#webdev #php type juggling

#webdev #php type juggling and casting and converting to int


<!--?php

PHP
echo 'is_int'.PHP_EOL;
echo is_int(1).PHP_EOL;
echo is_int('1').PHP_EOL;
echo is_int('a').PHP_EOL;
echo is_int('1234').PHP_EOL;
echo 'is_numeric'.PHP_EOL;
echo is_numeric(1).PHP_EOL;
echo is_numeric('1').PHP_EOL;
echo is_numeric('a').PHP_EOL;
echo is_numeric('1234').PHP_EOL;
echo intval(420000000000000000000).PHP_EOL; // 0
echo intval('420000000000000000000').PHP_EOL; // 2147483647

RETURNS

is_int
1
-
is_numeric
1
1
-
1
0
9223372036854775807