- time: documentation ( source)
- print_r: documentation ( source)
<?php
function variable_get($name, $default = NULL) {
global $conf;
return isset($conf[$name]) ? $conf[$name] : $default;
}
class at_fn {
public static function __callStatic($fn, $args) {
return call_user_func_array(variable_get("atfn:{$fn}", $fn), $args);
}
}
class at_fake {
public static function __callStatic($fn, $args) {
$GLOBALS['conf']["atfn:{$fn}"] = $args[0];
}
}
$time = time();
at_fake::time(function() use ($time) { return $time; });
print_r(at_fn::time());