3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set('display_errors', '1'); error_reporting(-1); $i++; // correctly shows notice echo "\n\n"; $x = &$foo->bar['bazz']['yadda']; // no notices $x[] = 123; var_export($foo); // but it exists! all of it! ?>
Output for 5.4.38 - 7.1.0
Notice: Undefined variable: i in /in/k3P8u on line 5 stdClass::__set_state(array( 'bar' => array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ), ))
Output for 5.1.0 - 5.4.37
Warning: ini_set() has been disabled for security reasons in /in/k3P8u on line 2 Notice: Undefined variable: i in /in/k3P8u on line 5 stdClass::__set_state(array( 'bar' => array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ), ))
Output for 5.0.4 - 5.0.5
Warning: ini_set() has been disabled for security reasons in /in/k3P8u on line 2 Notice: Undefined variable: i in /in/k3P8u on line 5 class stdClass { public $bar = array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ); }
Output for 5.0.0 - 5.0.3
Warning: ini_set() has been disabled for security reasons in /in/k3P8u on line 2 Notice: Undefined variable: i in /in/k3P8u on line 5 class stdClass { public $bar = array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ); }
Output for 4.3.5 - 4.4.9
Warning: ini_set() has been disabled for security reasons in /in/k3P8u on line 2 Notice: Undefined variable: i in /in/k3P8u on line 5 class stdClass { var $bar = array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ); }
Output for 4.3.1 - 4.3.4
Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/k3P8u on line 2 Notice: Undefined variable: i in /in/k3P8u on line 5 class stdClass { var $bar = array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ); }
Output for 4.3.0
Notice: Undefined variable: i in /in/k3P8u on line 5 class stdClass { var $bar = array ( 'bazz' => array ( 'yadda' => array ( 0 => 123, ), ), ); }