3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($foo = 'foo', $bar) { var_dump($foo, $bar); } foo();
Output for 7.1.0 - 7.2.6
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 0 passed in /in/l1qrv on line 8 and exactly 2 expected in /in/l1qrv:3 Stack trace: #0 /in/l1qrv(8): foo() #1 {main} thrown in /in/l1qrv on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.27
Warning: Missing argument 2 for foo(), called in /in/l1qrv on line 8 and defined in /in/l1qrv on line 3 Notice: Undefined variable: bar in /in/l1qrv on line 5 string(3) "foo" NULL
Output for hhvm-3.22.0
Warning: foo() expects exactly 2 parameters, 0 given in /in/l1qrv on line -1 Notice: Undefined variable: bar in /in/l1qrv on line -1 string(3) "foo" NULL
Output for hhvm-3.18.5 - 3.21.3
Warning: foo() expects exactly 2 parameters, 0 given in /in/l1qrv on line 3 Notice: Undefined variable: bar in /in/l1qrv on line 5 string(3) "foo" NULL