3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class myBaseClass { abstract protected function doSomething(); public function rerere() { return "..."; } } class myClass extends myBaseClass { public function doSomething() { $parent->rerere(); } } $implementor = new myClass(); $implementor->doSomething();
based on nfbQZ
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: parent in /in/3aRgZ on line 17 Fatal error: Uncaught Error: Call to a member function rerere() on null in /in/3aRgZ:17 Stack trace: #0 /in/3aRgZ(24): myClass->doSomething() #1 {main} thrown in /in/3aRgZ on line 17
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: parent in /in/3aRgZ on line 17 Fatal error: Uncaught Error: Call to a member function rerere() on unknown in /in/3aRgZ:17 Stack trace: #0 /in/3aRgZ(24): myClass->doSomething() #1 {main} thrown in /in/3aRgZ on line 17
Process exited with code 255.
Output for 5.6.7 - 5.6.28
Notice: Undefined variable: parent in /in/3aRgZ on line 17 Fatal error: Call to a member function rerere() on null in /in/3aRgZ on line 17
Process exited with code 255.
Output for 5.3.19 - 5.5.35
Notice: Undefined variable: parent in /in/3aRgZ on line 17 Fatal error: Call to a member function rerere() on a non-object in /in/3aRgZ on line 17
Process exited with code 255.