3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * The basic registry interface. * * @author Time.ly Network, Inc. * @since 2.0 * @package Ai1EC * @subpackage Ai1EC.Object */ interface Ai1ec_Registry { /** * Retrieves the key from the registry * * @param string $key * * @return mixed the value associated to the key. */ public function get( $key ); /** * Set the key into the registry. * * @param string $key * @param mixed $value */ public function set( $key, $value ); } /** * Application Registry: handles application wide variables. * * @author Time.ly Network, Inc. * @since 2.0 * @package Ai1EC * @subpackage Ai1EC.Object */ class Ai1ec_Registry_Application implements Ai1ec_Registry { /** * @var Ai1ec_Registry_Object */ protected $_registry; /** * @var array */ protected $_environment = array(); /** * The contructor method. * * @param Ai1ec_Registry_Object $registry */ function __construct( Ai1ec_Registry_Object $registry ) { $this->_registry = $registry; } /* (non-PHPdoc) * @see Ai1ec_Registry::get() */ public function get( $key ) { if ( ! isset ( $this->_environment[$key] ) ) { return false; } return $this->_environment[$key]; } /* (non-PHPdoc) * @see Ai1ec_Registry::set() */ public function set( $key, $value ) { $this->_environment[$key] = $value; } } $app = new Ai1ec_Registry_Application(); $app->set( 'foo', 'baz' ); echo $app->get( 'foo' );
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Ai1ec_Registry_Application::__construct(), 0 passed in /in/cYo3V on line 77 and exactly 1 expected in /in/cYo3V:55 Stack trace: #0 /in/cYo3V(77): Ai1ec_Registry_Application->__construct() #1 {main} thrown in /in/cYo3V on line 55
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.18 ms | 401 KiB | 8 Q