3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Parent { public function method() { echo "hi!"; } } class Child extends Parent { public function method() { echo "bye!"; } } $class = new Child; $class->method();
Output for 7.0.0 - 7.0.1
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/DjAOH on line 3
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/DjAOH on line 4
Process exited with code 255.