run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( // Creates Key1 and assigns the value to it // A copy of the value is also placed in $ref // At this stage, it's not a reference "Key1"=>($ref = array( "Value1", "Value2" )), // Now Key2 is a reference to $ref, but not to Key1 "Key2"=>&$ref, // Now everything is referenced together "Key1"=>&$ref );
Output for 4.3.0 - 7.2.0