<?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();
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.33
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.
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.