3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { public static function who(){ return __CLASS__; } static public function create($params = array()){ $class = static::who(); return new $class($params); } } class bar extends foo {} print_r(new foo); print_r(new bar);
Output for 5.3.7 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
foo Object ( ) bar Object ( )
Output for hhvm-3.10.0

Process exited with code 153.