3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($b){ if(!empty($b)){ var_dump($b); } } test(); test(null);
based on TRoNL
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in /in/sHPao on line 9 and exactly 1 expected in /in/sHPao:3 Stack trace: #0 /in/sHPao(9): test() #1 {main} thrown in /in/sHPao on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Warning: Missing argument 1 for test(), called in /in/sHPao on line 9 and defined in /in/sHPao on line 3
Output for hhvm-3.15.4
Warning: test() expects exactly 1 parameter, 0 given in /in/sHPao on line 4