3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class RecursiveArrayObject extends ArrayObject { public function __construct(array $array, $flags=ArrayObject::ARRAY_AS_PROPS) { foreach ($array as $key => $value) { if (is_array($value)) { $value = new self($value,$flags); } $this->_offsetSet($key, $value); } $this->setFlags($flags); } private function _offsetSet($index, $newval) { parent::offsetSet($index, $newval); } public function offsetSet($index, $newval) { var_dump($index); $this->_offsetSet($index, $newval); } public function __set($name, $value) { var_dump($name); var_dump($value); if (is_array($value)) { $value = new self($value,$flags); }else{ $this->offsetSet($name, $value); } } } $baseConfig = new RecursiveArrayObject( array( 'titulo' => 'CAWZ :: Central Admin Web Zone', 'dominio' => $_SERVER['HTTP_HOST'], 'urlActual' => $_SERVER['REQUEST_URI'], 'pagina' => basename($_SERVER['SCRIPT_NAME']), 'basePath' => dirname($_SERVER['DOCUMENT_ROOT']), 'clases' => dirname(dirname($_SERVER['DOCUMENT_ROOT'])) . '/libs', 'plantillas' => dirname($_SERVER['DOCUMENT_ROOT']) . '/plantillas/', 'traducciones' => dirname(dirname($_SERVER['DOCUMENT_ROOT'])) . '/idiomas', 'imagenes' => array( 'apartamentos' => array( 'path' => dirname($_SERVER['DOCUMENT_ROOT']) . '/www/apartamentos', 'sizes' => array('s' => '120x90', 'm' => '120x90', 'l' => '120x90'), ) ), 'idioma' => array( 'base' => 'es', 'locales' => array('es' => 'es_ES.UTF8', 'en' => 'en_US.UTF8') ), 'debug' => true ) );
Output for 5.3.0 - 7.1.0
Notice: Undefined index: HTTP_HOST in /in/fqLRJ on line 36 Notice: Undefined index: REQUEST_URI in /in/fqLRJ on line 37
Output for 5.2.3 - 5.2.17
Notice: Undefined index: HTTP_HOST in /in/fqLRJ on line 36 Notice: Undefined index: REQUEST_URI in /in/fqLRJ on line 37
Output for 5.1.0 - 5.2.2
Notice: Undefined index: HTTP_HOST in /in/fqLRJ on line 36 Notice: Undefined index: REQUEST_URI in /in/fqLRJ on line 37 Notice: Undefined index: SCRIPT_NAME in /in/fqLRJ on line 38 Notice: Undefined index: DOCUMENT_ROOT in /in/fqLRJ on line 39 Notice: Undefined index: DOCUMENT_ROOT in /in/fqLRJ on line 40 Notice: Undefined index: DOCUMENT_ROOT in /in/fqLRJ on line 41 Notice: Undefined index: DOCUMENT_ROOT in /in/fqLRJ on line 42 Notice: Undefined index: DOCUMENT_ROOT in /in/fqLRJ on line 45
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/fqLRJ on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/fqLRJ on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/fqLRJ on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/fqLRJ on line 5
Process exited with code 255.