3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bar = 'foo'; function foo($bar) { return $bar; } echo foo();
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 0 passed in /in/qh98o on line 9 and exactly 1 expected in /in/qh98o:5 Stack trace: #0 /in/qh98o(9): foo() #1 {main} thrown in /in/qh98o on line 5
Process exited with code 255.
Output for 5.1.0 - 7.0.14
Warning: Missing argument 1 for foo(), called in /in/qh98o on line 9 and defined in /in/qh98o on line 5 Notice: Undefined variable: bar in /in/qh98o on line 6
Output for 4.3.0 - 5.0.5
Warning: Missing argument 1 for foo() in /in/qh98o on line 5