3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Person { public function name($name) { return $this>name($name); } } $user = new Person; var_dump($person->name('chris'));
based on mjeSI
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: person in /in/DeGDd on line 13 Fatal error: Uncaught Error: Call to a member function name() on null in /in/DeGDd:13 Stack trace: #0 {main} thrown in /in/DeGDd on line 13
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: person in /in/DeGDd on line 13 Fatal error: Uncaught Error: Call to a member function name() on unknown in /in/DeGDd:13 Stack trace: #0 {main} thrown in /in/DeGDd on line 13
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Notice: Undefined variable: person in /in/DeGDd on line 13 Fatal error: Call to a member function name() on null in /in/DeGDd on line 13
Process exited with code 255.
Output for 5.3.17 - 5.5.35
Notice: Undefined variable: person in /in/DeGDd on line 13 Fatal error: Call to a member function name() on a non-object in /in/DeGDd on line 13
Process exited with code 255.