3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Thing { public function stuff() { $lambda = function() { static $y; $y++; }; var_dump(spl_object_hash($lambda)); } } $x = new Thing(); $x->stuff(); $x->stuff();

preferences:
49.51 ms | 402 KiB | 5 Q