3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($b, $c = null){ var_dump($b); var_dump($c); } test(); test("oi", null);
based on GDUQk
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in /in/bd2JH on line 8 and at least 1 expected in /in/bd2JH:3 Stack trace: #0 /in/bd2JH(8): test() #1 {main} thrown in /in/bd2JH 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/bd2JH on line 8 and defined in /in/bd2JH on line 3 Notice: Undefined variable: b in /in/bd2JH on line 4 NULL NULL string(2) "oi" NULL
Output for hhvm-3.15.4
Warning: test() expects at least 1 parameter, 0 given in /in/bd2JH on line 3 Notice: Undefined variable: b in /in/bd2JH on line 4 NULL NULL string(2) "oi" NULL