3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($id = null) { if (!$id) { return false; } $getArg = $id; if ($getArg (is_numeric($getArg) || $getArg === 'test')) { return true; } return false; } var_dump(test('1'));
based on L6gtL
Output for 7.0.28 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function 1() in /in/SXN5j:10 Stack trace: #0 /in/SXN5j(17): test('1') #1 {main} thrown in /in/SXN5j on line 10
Process exited with code 255.
Output for 5.6.38
Fatal error: Call to undefined function 1() in /in/SXN5j on line 10
Process exited with code 255.