3v4l.org

run code in 300+ 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.4.0 - 7.4.29, 8.0.1 - 8.0.18, 8.1.0 - 8.1.5
6

preferences:
57.41 ms | 406 KiB | 5 Q