3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( "42", 1337, 0x539, '0x539', "0x539", 02471, '02471', "02471", 0b10100111001, '0b10100111001', "0b10100111001", ); foreach ($tests as $element) { if (is_numeric($element)) { echo "'{$element}' is considered numeric", PHP_EOL; } else { echo "'{$element}' is not considered numeric", PHP_EOL; } }

preferences:
48.53 ms | 402 KiB | 5 Q