3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class super { public function a() { $this->b(); } private function b() { print "super\n"; } } class sub extends super { } $obj = new class() extends super { private function b() { print "sub\n"; } }; $obj->a();
based on aPTfC
Output for 7.0.0 - 7.2.0
super
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/i3743 on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/i3743 on line 12
Process exited with code 255.