3v4l.org

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