3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public static function create() { $class = get_called_class(); $inst = new $class; return $inst; } } class Bar extends Foo { function __construct() { parent::constsssdfvdruct(); } } $bar = Bar::create(); var_dump($bar);
based on h4HAY
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method Foo::constsssdfvdruct() in /in/ks67J:13 Stack trace: #0 /in/ks67J(6): Bar->__construct() #1 /in/ks67J(17): Foo::create() #2 {main} thrown in /in/ks67J on line 13
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Call to undefined method Foo::constsssdfvdruct() in /in/ks67J on line 13
Process exited with code 255.