3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Parent { public function __construct(&$foo) { } } class Child extends Parent { public function __construct() { parent::__construct(getFoo()); } } function getFoo() { return new stdClass; }
Output for 5.4.18 - 5.4.19
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/lQFk5 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.4.17
Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/i4jZo on line 3
Process exited with code 255.