- var_dump: documentation ( source)
<?php
$a = array(0, 1, 2);
$ref = &$a[2];
$b = $a;
// Element [2] is not int(2) but &int(2)
var_dump($a);
// Updating $ref also updates $a[2], as expected
$ref = 99;
var_dump($a);
// $b[2] is also &int(99), it references the same object as $a[2] and $ref
var_dump($b);
// Therefore we can do the same update by reference
$b[2] = 1234;
var_dump($a);