3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tests = array( 0, '0.0', '', null, ); foreach ($tests as $element) { if (is_numeric($element)) { echo "'{$element}' is numeric\n"; } else { echo "'{$element}' is NOT numeric\n"; } } ?>
Output for 4.3.0 - 7.1.0
'0' is numeric '0.0' is numeric '' is NOT numeric '' is NOT numeric