3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x['a']['b']['c']['d']['e']='y'; $x['aaa']='FirstLevel'; $x['a']['_parent'] = &$x; $x['a']['b']['_parent'] = &$x['a']; $x['a']['b']['c']['_parent'] = &$x['a']['b']; $x['a']['b']['c']['d']['_parent'] = &$x['a']['b']['c']; var_export($x);
based on CgpFu
Output for 7.0.0 - 7.1.0
Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 array ( 'a' => array ( 'b' => array ( 'c' => array ( 'd' => array ( 'e' => 'y', '_parent' => NULL, ), '_parent' => NULL, ), '_parent' => NULL, ), '_parent' => NULL, ), 'aaa' => 'FirstLevel', )
Output for 5.4.7 - 5.6.28
Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 Warning: var_export does not handle circular references in /in/0U1k9 on line 11 array ( 'a' => array ( 'b' => array ( 'c' => array ( 'd' => array ( 'e' => 'y', '_parent' => NULL, ), '_parent' => NULL, ), '_parent' => NULL, ), '_parent' => array ( 'a' => NULL, 'aaa' => 'FirstLevel', ), ), 'aaa' => 'FirstLevel', )
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.4.6
Fatal error: Nesting level too deep - recursive dependency? in /in/0U1k9 on line 11
Process exited with code 255.
Output for 4.3.2 - 5.2.13, 5.3.0 - 5.3.2
array ( 'a' => array ( 'b' => array ( 'c' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( Fatal error: Nesting level too deep - recursive dependency? in /in/0U1k9 on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
array ( 'a' => array ( 'b' => array ( 'c' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( 'd' => array ( 'e' => 'y', '_parent' => array ( Fatal error: Nesting level too deep - recursive dependency? in /in/0U1k9 on line 11