3v4l.org

run code in 300+ PHP versions simultaneously
<?php function uppercase(Traversable $in) { foreach ($in as $word) { yield strtoupper($word); } } function reverse(Traversable $in) { foreach ($in as $word) { yield strrev($word); } } function each_println(Traversable $in) { foreach ($in as $line) { echo "$line\n"; } } each_println(strrev(uppercase(new ArrayIterator(["foo", "bar", "baz"]))));

preferences:
35.16 ms | 402 KiB | 5 Q