- var_dump: documentation ( source)
<?php
$foo = ['apple'];
$test =& $foo;
$bar = $foo;
$bar[0] = 'orange';
var_dump($test[0]);
$foo = ['apple'];
$bar = $foo;
$test =& $foo[0];
$bar[0] = 'orange';
var_dump($test);
$foo = ['apple'];
$test =& $foo[0];
$bar = $foo;
$bar[0] = 'orange';
var_dump($test);