3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $myarray = array("level1" => array("level2" => array("level3" => "value"))); function test(){ global $myarray; $myarray =& $myarray["level1"]; print_r($myarray); //returns "Array ( [level2] => Array ( [level3] => value ) )" } test(); echo "<br>"; print_r($myarray); //returns "Array ( [level1] => Array ( [level2] => Array ( [level3] => value ) ) )"
Output for 4.3.0 - 5.0.5, 5.1.1 - 7.1.0
Array ( [level2] => Array ( [level3] => value ) ) <br>Array ( [level1] => Array ( [level2] => Array ( [level3] => value ) ) )
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/uAQCF on line 15
Process exited with code 255.