3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstrac class Base { protected function __construct(){} public function create(){ return new self(); } abstract function action(); } class Item extends Base{ public function action(){ echo __CLASS__ } } $item = Item::create(); $item->action();
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/NPKQc on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CLASS in /in/NPKQc on line 3
Process exited with code 255.