3v4l.org

run code in 300+ PHP versions simultaneously
<?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 === $y);

preferences:
43.9 ms | 402 KiB | 5 Q