3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function f($a,$b) { $c = $a+$b; } f(1); f(1, 2); f(1, 2, 3); f(1, 2, 3, 4); f(1, 2, 3, 4, 5); ?>
Output for 7.1.0 - 7.2.6
Fatal error: Uncaught ArgumentCountError: Too few arguments to function f(), 1 passed in /in/ibun3 on line 6 and exactly 2 expected in /in/ibun3:2 Stack trace: #0 /in/ibun3(6): f(1) #1 {main} thrown in /in/ibun3 on line 2
Process exited with code 255.
Output for 5.1.0 - 7.0.20
Warning: Missing argument 2 for f(), called in /in/ibun3 on line 6 and defined in /in/ibun3 on line 2 Notice: Undefined variable: b in /in/ibun3 on line 3
Output for 4.3.0 - 5.0.5
Warning: Missing argument 2 for f() in /in/ibun3 on line 2