3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = '7db5eef616a2c672630953954757df8400eeed22a3e0fc1ac6c5555200e122b91e6825b8faf19c723cb09de3da434970a157c21c31b6986e4a75b777361168bc'; $clientSeed = 'FFFFE380'; $nonce = 1; for($nonce =1; $nonce <= 20; $nonce++){ $seed = $serverSeed.'-'.$clientSeed.'-'.$nonce; do { $seed = sha1($seed); $lucky = hexdec(substr($seed,0,8)); } while ($lucky > 4294960000); $luckyNumber = ($lucky % 10000) / 100; if ($luckyNumber < 0) $luckyNumber = -$luckyNumber; echo $nonce.":".$luckyNumber; echo ("\n"); } ?>
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
1:85.46 2:12.02 3:26.16 4:42.22 5:98.73 6:76.27 7:44.16 8:30.82 9:99.28 10:0.08 11:58.87 12:96.85 13:54.85 14:58.68 15:68.7 16:69.83 17:47.51 18:40.62 19:4.58 20:61.26

preferences:
83.49 ms | 408 KiB | 5 Q