3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = 'fc7005e05de4fd975537be6e6f7e71e887ef5ffb977e797952ca547f4532282fdf46b3155aceaf797909cf9b100a42970bfd9b3f4c1d846974780eab9d305701'; $clientSeed = 'b5549fe27d71536442e1b3586f891cdf847c5af19da585f36130208ed62a629ba334fb8734c241a9ab2fed37331f0a78b20cfe73770b0e322fee8f9afef3a415'; $nonce = 1; $hnonce = 1; for($nonce =1; $nonce < 1000; $nonce++){ $hnonce = sha512($nonce); $seed = $serverSeed.'-'.$clientSeed.'-'.$hnonce; 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 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Call to undefined function sha512() in /in/TPlKZ:9 Stack trace: #0 {main} thrown in /in/TPlKZ on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Fatal error: Call to undefined function sha512() in /in/TPlKZ on line 9
Process exited with code 255.

preferences:
222.56 ms | 401 KiB | 292 Q