- var_dump: documentation ( source)
<?php
class Testme {
public static function foo(&$ref, &$ref2) {
$ref = 1;
$ref2 = 2;
}
}
class Invoker {
public static function invoke($func_name, &$args){
call_user_func_array(array('Testme', $func_name), $args);
}
}
$test = 5;
$test2 = 6;
$args[] = &$test;
$args[] = &$test2;
Invoker::invoke('foo', $args);
var_dump($test);
var_dump($test2);