3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php class MyClass { protected function myFunc() { echo "MyClass::myFunc()\n"; } } class OtherClass extends MyClass { // Override parent's definition public function myFunc() { // But still call the parent function parent::myFunc(); echo "OtherClass::myFunc()\n"; } } $class = new OtherClass(); $class->myFunc(); ?>
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '<' in /in/5cM8a on line 3
Process exited with code 255.