3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php abstract class First(){ const id = __CLASS__; public static function start(){ static::run(new static); } protected static function run(First $instance){ echo __CLASS__, PHP_EOL; $insttance->dynamicRun(); } protected function dynamicRun(){ echo self::id, PHP_EOL, get_class($this); } } class Second extends First(){ const id = __CLASS__; public static function start(){ parent::run(new static); } } Second::start();
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '(', expecting '{' in /in/Tuvnn on line 2
Process exited with code 255.