3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.0 - 5.3.27, 5.4.0 - 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.

preferences:
178.94 ms | 1399 KiB | 55 Q