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 sHPao
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in /in/hAD64 on line 9 and exactly 1 expected in /in/hAD64:3 Stack trace: #0 /in/hAD64(9): test() #1 {main} thrown in /in/hAD64 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/hAD64 on line 9 and defined in /in/hAD64 on line 3 Notice: Undefined variable: b in /in/hAD64 on line 5 NULL NULL
Output for hhvm-3.15.4
Warning: test() expects exactly 1 parameter, 0 given in /in/hAD64 on line 4 Notice: Undefined variable: b in /in/hAD64 on line 5 NULL NULL