3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tests = array( "42", 1337, 0x539, 02471, '0b10100111001', 1337e0, "not numeric", array(), 9.1 ); foreach ($tests as $element) { if (is_numeric($element)) { echo "'{$element}' is numeric", PHP_EOL; } else { echo "'{$element}' is NOT numeric", PHP_EOL; } }
Output for 5.6.0 - 7.3.0beta1
'42' is numeric '1337' is numeric '1337' is numeric '1337' is numeric '0b10100111001' is NOT numeric '1337' is numeric 'not numeric' is NOT numeric Notice: Array to string conversion in /in/G4VQb on line 19 'Array' is NOT numeric '9.1' is numeric