- var_dump: documentation ( source)
<?php
class Test
{
private $value;
public function Set($value)
{
$this->value = $value;
}
public function GetByRef(&$ref)
{
$ref = $this->value; //SET REF PARAMETER TO THIS VALUE BY REF
}
}
$test = new Test();
$test->Set('test');
$test->GetByRef($value1);
var_dump($value1); //NULL INSTEAD OF 'test'!