3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo (?string $test) { var_dump($test); } foo();
based on HkQT3
Output for 7.1.0 - 7.3.0rc4
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 0 passed in /in/o3jfE on line 7 and exactly 1 expected in /in/o3jfE:3 Stack trace: #0 /in/o3jfE(7): foo() #1 {main} thrown in /in/o3jfE on line 3
Process exited with code 255.
Output for 5.6.38 - 7.0.28
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /in/o3jfE on line 3
Process exited with code 255.