3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function() { throw new \Error(); }); function &gen() { try { return 1; } catch (Error $e) { print "Caught"; } } foreach (gen() as $y);

preferences:
142.51 ms | 404 KiB | 5 Q