3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed ="ef2809b1d2b6968a02efaaa3e91e59491326fb0bf4d95c35ace509e96e207033fba4e5f632ebbf4d6035c5bc2bcb081ba8abc1e629c15aea47b3495dbc8aabd2"; $clientSeed ="TWE2SmlF0yOPU5UT"; $nonce ="14"; { $seed=hash_hmac('sha512',$clientSeed .','. $nonce, $serverSeed); $offset=0; do{ $number=substr($seed,$offset,5); $number=hexdec($number); $offset+=5; } while($number > 999999); $luckyNumber = ($number % 10000) / 100; echo $luckyNumber; }
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
88.16

preferences:
171.93 ms | 459 KiB | 5 Q