- var_dump: documentation ( source)
<?php
class a
{
public function f(&$ref1, &$ref2)
{
$ref1 = 'foo';
$ref2 = 'bar';
}
}
class b
{
public function __call($methodName, $arguments)
{
$a = new a();
call_user_func_array(array(
$a, $methodName //->$methodName( $arguments[0][0], $arguments[0][1]);
), $arguments[0]);
}
}
$ref1 = 'X';
$ref2 = 'Y';
$b = new b();
$b->f( array( &$ref1, &$ref2));
var_dump($ref1, $ref2);