3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function my_name($name) { return ucfirst($name); } var_dump(call_user_func("my_name"));
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function my_name(), 0 passed in /in/5KrfP on line 7 and exactly 1 expected in /in/5KrfP:2 Stack trace: #0 /in/5KrfP(7): my_name() #1 {main} thrown in /in/5KrfP on line 2
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Warning: Missing argument 1 for my_name(), called in /in/5KrfP on line 7 and defined in /in/5KrfP on line 2 Notice: Undefined variable: name in /in/5KrfP on line 4 string(0) ""
Output for 5.1.0 - 5.6.25
Warning: Missing argument 1 for my_name() in /in/5KrfP on line 2 Notice: Undefined variable: name in /in/5KrfP on line 4 string(0) ""
Output for 4.3.0 - 5.0.5
Warning: Missing argument 1 for my_name() in /in/5KrfP on line 2 string(0) ""