Using PHP 5.3.5. Not sure how this works on other versions.
I\'m confused about using strings that hold numbers, e.g., \'0x4B0\' or \'1.2e3\'
\'0x4B0\'
\'1.2e3\'
intval uses strtol which recognizes oct/hex prefixes when the base parameter is zero, so
intval
base
var_dump(intval('0xef')); // int(0) var_dump(intval('0xff', 0)); // int(255)