3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tests = array( 0, '0', '', null, ); foreach ($tests as $element) { if (is_numeric($element)) { echo "'{$element}' is numeric", PHP_EOL; } else { echo "'{$element}' is NOT numeric", PHP_EOL; } } ?>
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
'0' is numeric '0' is numeric '' is NOT numeric '' is NOT numeric
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
'0' is numeric Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/D3g2G on line 11 PHP_EOL'0' is numeric Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/D3g2G on line 11 PHP_EOL'' is NOT numeric Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/D3g2G on line 13 PHP_EOL'' is NOT numeric Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/D3g2G on line 13 PHP_EOL