3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = '4aac3d2c5f1a0750abdd8b3b26aec3018877da8acdfe46523baa53e9586023d0ffafcddfb1463c17341e3e3f9d9eba73a4952ab61f572e328afa024ea01d311d'; $clientSeed = 'TWE2SmlF0yOPU5UT'; $nonce = 0; for($nonce =0; $nonce < 10; $nonce++){ $seed= $serverSeed.','.$clientSeed.','.$nonce; $seed=hash("sha512",$seed); $offset=0; do{ $number=substr($seed,$offset,5); $number=hexdec($number); $offset+=5; } while($number > 999999); $luckyNumber = ($number % 10000) / 100; echo $luckyNumber; echo nl2br ("\n"); }
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
34.29<br /> 47.25<br /> 42.27<br /> 21.87<br /> 68.03<br /> 54.36<br /> 85.11<br /> 66.72<br /> 17.04<br /> 52.33<br />

preferences:
132.57 ms | 459 KiB | 5 Q