3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ExtendClass extends SimpleClass { // Redefine the parent method function displayVar() { echo "Extending class\n"; parent::displayVar(); } } $extended = new ExtendClass(); $extended->displayVar(); ?>
based on 36fGm
Output for 7.3.0 - 7.3.1
Fatal error: Uncaught Error: Class 'SimpleClass' not found in /in/Dn1l4:2 Stack trace: #0 {main} thrown in /in/Dn1l4 on line 2
Process exited with code 255.
Output for 7.0.0 - 7.2.13
Fatal error: Class 'SimpleClass' not found in /in/Dn1l4 on line 2
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Class 'SimpleClass' not found in /in/Dn1l4 on line 3
Process exited with code 255.