Miscellany
public text v1 · immutable<?php
function foo($refresh = FALSE) {
static $storage;
if ($refresh) {
unset($storage);
}
if (!isset($storage)) {
$x = new stdClass();
$x->t = microtime();
$storage[$x->t] = $x;
}
return $storage;
}
var_dump(foo());
var_dump(foo(TRUE));
var_dump(foo());