3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo() { print "a"; yield 2; print "b"; } foo(); ?>