3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Container// implements \ArrayAccess { protected $values; public function __construct (array $values = array()) { $this->values = $values; } /* ... */ } class ServiceContainer extends Container { protected static $instance; protected $storage; protected function __construct($storage) { $this->storage = $storage; } public static function init(ServiceStorageInterface $storage) { return static::$instance = new static($storage); } public static function getInstance() { if ( ! isset(static::$instance)) { throw new Exception('ServiceContainer is not initialized'); } return static::$instance; } }
Output for 5.3.0 - 5.4.4
Fatal error: Access level to ServiceContainer::__construct() must be public (as in class Container) in /in/pB1mb on line 35
Process exited with code 255.