3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { private function __construct() {} } class B { final private function __construct() {} } class C extends A { public function __construct() {} } class D extends B { public function __construct() {} } var_dump(new C()); var_dump(new D());
Output for 5.3.0 - 5.3.24, 5.3.26, 5.4.0 - 5.4.17
Fatal error: Cannot override final method B::__construct() in /in/0ssd7 on line 21
Process exited with code 255.
Output for 5.3.25, 5.3.27
Fatal error: Cannot override final method B::__construct() in /in/MmtRb on line 21
Process exited with code 255.