- var_dump: documentation ( source)
<?php
class Foo {
public $value = 3;
function &getValue() {
return $this->value;
}
function test() {
$params = array();
$params[] = &$this->getValue();
$params[] = $this->getValue();
return $params;
}
}
$foo = new Foo();
var_dump($foo->test());