3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class T{ final private function __construct(){ } public static function getInstanse() { if (!isset(static::$instanses)) { static::$instanses = new $this; } return static::$instanses; } } class A extends T{ } $t = A::getInstance(); var_dump($t); ?>
based on km7fb
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method A::getInstance() in /in/ur5gs:22 Stack trace: #0 {main} thrown in /in/ur5gs on line 22
Process exited with code 255.
Output for 5.3.17 - 5.6.28
Fatal error: Call to undefined method A::getInstance() in /in/ur5gs on line 22
Process exited with code 255.