3v4l.org

run code in 500+ PHP versions simultaneously
<?php for ($i = 0; $i < 1000000; $i++) { $random = array_rand(range(1, 49), 6); if (count(array_unique($random)) !== 6) { echo "BREAK"; } } echo count($random);
Output for 7.0.25 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.5
6

preferences:
30.7 ms | 1136 KiB | 7 Q