- var_dump: documentation ( source)
<?php
function test($obj){
static $c;
if(!isset($c))
$c = function(){ return 'baz'; };
$obj->store = $c;
}
test($x = new stdclass);
test($y = new stdclass);
var_dump($x->store === $y->store);