3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1) function someFunction(int $someVariable): bool { if ($someVariable > 10) { return true; } else if ($someVariable < -10) { return false; } return null; } var_dump(someFunction("11")); var_dump(someFunction("-11"));
based on cQ6K0
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'someFunction' (T_STRING), expecting '(' in /in/NUFUT on line 4
Process exited with code 255.
Output for 5.4.11 - 5.6.17
Warning: Unsupported declare 'strict_types' in /in/NUFUT on line 2 Parse error: syntax error, unexpected 'someFunction' (T_STRING), expecting '(' in /in/NUFUT on line 4
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Warning: Unsupported declare 'strict_types' in /in/NUFUT on line 2 Parse error: syntax error, unexpected T_STRING, expecting '(' in /in/NUFUT on line 4
Process exited with code 255.