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