3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo ($a = 10, $b){ if ($a) { return $b/10; } } echo foo(0);
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 1 passed in /in/Vt58g on line 7 and exactly 2 expected in /in/Vt58g:2 Stack trace: #0 /in/Vt58g(7): foo(0) #1 {main} thrown in /in/Vt58g on line 2
Process exited with code 255.
Output for 5.5.31 - 7.0.14
Warning: Missing argument 2 for foo(), called in /in/Vt58g on line 7 and defined in /in/Vt58g on line 2