3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fn = (function() { $i = 0; return function() use(&$i) { return $i++; }; })(); var_dump($fn()); var_dump($fn()); var_dump($fn());
based on MV8Nv