3v4l.org

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