3v4l.org

run code in 300+ PHP versions simultaneously
<?php function randList($number) { for ($i=0;$i<$number;$i++) { yield rand(1, 10); } } foreach (randList(1000000) as $number) { //echo "$number "; } echo "\n";

preferences:
31.44 ms | 402 KiB | 5 Q