3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = '4aac3d2c5f1a0750abdd8b3b26aec3018877da8acdfe46523baa53e9586023d0ffafcddfb1463c17341e3e3f9d9eba73a4952ab61f572e328afa024ea01d311d'; $clientSeed = 'TWE2SmlF0yOPU5UT'; $nonce = '1'; { $seed1= $serverSeed.','.$clientSeed.','.$nonce; $seed=hash("sha512",$seed1); $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
47.25<br />

preferences:
159.44 ms | 459 KiB | 5 Q