- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.26
- Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/9qBrU on line 13
Process exited with code 255.
<?php
abstract 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();