3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php register_shutdown_function(function($errno, $errstr, $errfile, $errline, array $errcontext) { echo "Did you mean getName()?"; die; }); class User { public function getName() { return "Daniel Ribeiro"; } } $user = new User(); $user->getN4me();
based on H78hG
Output for 7.1.0
Fatal error: Uncaught Error: Call to undefined method User::getN4me() in /in/06EZg:18 Stack trace: #0 {main} thrown in /in/06EZg on line 18 Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 0 passed and exactly 5 expected in /in/06EZg:3 Stack trace: #0 [internal function]: {closure}() #1 {main} thrown in /in/06EZg on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Fatal error: Uncaught Error: Call to undefined method User::getN4me() in /in/06EZg:18 Stack trace: #0 {main} thrown in /in/06EZg on line 18 Warning: Missing argument 1 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 2 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 3 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 4 for {closure}() in /in/06EZg on line 3 Fatal error: Uncaught TypeError: Argument 5 passed to {closure}() must be of the type array, none given in /in/06EZg:3 Stack trace: #0 [internal function]: {closure}() #1 {main} thrown in /in/06EZg on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Call to undefined method User::getN4me() in /in/06EZg on line 18 Warning: __invoke() expects exactly 5 parameters, 0 given in /in/06EZg on line 7 Catchable fatal error: Argument 5 passed to __invoke() must be an instance of array, undefined variable given in /in/06EZg on line 7
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 137.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined method User::getN4me() in /in/06EZg on line 18 Warning: Missing argument 1 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 2 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 3 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 4 for {closure}() in /in/06EZg on line 3 Catchable fatal error: Argument 5 passed to {closure}() must be of the type array, none given in /in/06EZg on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Fatal error: Call to undefined method User::getN4me() in /in/06EZg on line 18 Warning: Missing argument 1 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 2 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 3 for {closure}() in /in/06EZg on line 3 Warning: Missing argument 4 for {closure}() in /in/06EZg on line 3 Catchable fatal error: Argument 5 passed to {closure}() must be an array, none given in /in/06EZg on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/06EZg on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/06EZg on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/06EZg on line 3
Process exited with code 255.