3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "what the h "; $json = json_encode(array("c" =>array(),"b" => array())); $decodeJSON = json_decode($json,true); var_dump($decodeJSON); test($decodeJSON, array("a","b")); echo "<br/> here is what should be new unencoded json <br/>"; var_dump($decodeJSON); function test (&$jContent, $arr) { foreach($jContent as &$arrayName => $array) { $arrayName = "lll "; } }
Output for 7.0.0 - 7.0.17, 7.1.0 - 7.1.3
Fatal error: Key element cannot be a reference in /in/sTYY4 on line 15
Process exited with code 255.

preferences:
178.53 ms | 1395 KiB | 29 Q