3v4l.org

run code in 500+ 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:
24.88 ms | 489 KiB | 6 Q