3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function printHello($hello) { echo $hello . PHP_EOL; } printHello('hello'); printHello(); printHello('hello', 'minna-san');
Output for 7.1.0 - 7.2.0
hello Fatal error: Uncaught ArgumentCountError: Too few arguments to function printHello(), 0 passed in /in/mSn4Y on line 9 and exactly 1 expected in /in/mSn4Y:3 Stack trace: #0 /in/mSn4Y(9): printHello() #1 {main} thrown in /in/mSn4Y on line 3
Process exited with code 255.
Output for 5.3.21 - 7.0.20
hello Warning: Missing argument 1 for printHello(), called in /in/mSn4Y on line 9 and defined in /in/mSn4Y on line 3 Notice: Undefined variable: hello in /in/mSn4Y on line 5 hello