- var_dump: documentation ( source)
<?php
class Foo {
public $prop;
}
$foo = new Foo();
$str = 'abc'; // $str is a string
$foo->prop = &$str;
var_dump($foo->prop); // "abc"
$arr = array();
$foo->prop = $arr;
var_dump($foo->prop); // array()
var_dump($str); // array() - surprise! $str is now an array