3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { final private function __construct() {} static public function get() { return new static(); } } class Y extends X { final public function __construct() {} } new Y();
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
Fatal error: Cannot override final method X::__construct() in /in/NueVQ on line 14
Process exited with code 255.

preferences:
166.92 ms | 1395 KiB | 28 Q