3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Parent { public function test(stdClass $thing) { print($thing); } } class Child extends Parent { public function test($thing = null) { print($thing); } } $child = new Child(); $child->test(new stdClass());
Output for 7.0.0 - 7.0.2
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/Mf8Gi on line 3
Process exited with code 255.
Output for 5.3.21 - 5.6.17
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/Mf8Gi on line 4
Process exited with code 255.