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 = '4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a'; $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"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 6
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 12
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 6
Branch analysis from position: 41
Branch analysis from position: 6
Branch analysis from position: 34
Branch analysis from position: 12
filename:       /in/rLuMN
function name:  (null)
number of ops:  42
compiled vars:  !0 = $serverSeed, !1 = $clientSeed, !2 = $nonce, !3 = $hnonce, !4 = $seed, !5 = $lucky, !6 = $luckyNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'fc7005e05de4fd975537be6e6f7e71e887ef5ffb977e797952ca547f4532282fdf46b3155aceaf797909cf9b100a42970bfd9b3f4c1d846974780eab9d305701'
    4     1        ASSIGN                                                   !1, 'b5549fe27d71536442e1b3586f891cdf847c5af19da585f36130208ed62a629ba334fb8734c241a9ab2fed37331f0a78b20cfe73770b0e322fee8f9afef3a415'
    5     2        ASSIGN                                                   !2, 1
    6     3        ASSIGN                                                   !3, 1
    8     4        ASSIGN                                                   !2, 1
          5      > JMP                                                      ->39
    9     6    >   ASSIGN                                                   !3, '4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a'
   10     7        CONCAT                                           ~13     !0, '-'
          8        CONCAT                                           ~14     ~13, !1
          9        CONCAT                                           ~15     ~14, '-'
         10        CONCAT                                           ~16     ~15, !3
         11        ASSIGN                                                   !4, ~16
   12    12    >   INIT_FCALL                                               'sha1'
         13        SEND_VAR                                                 !4
         14        DO_ICALL                                         $18     
         15        ASSIGN                                                   !4, $18
   13    16        INIT_FCALL                                               'hexdec'
         17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !4
         19        SEND_VAL                                                 0
         20        SEND_VAL                                                 8
         21        DO_ICALL                                         $20     
         22        SEND_VAR                                                 $20
         23        DO_ICALL                                         $21     
         24        ASSIGN                                                   !5, $21
   14    25        IS_SMALLER                                               4294960000, !5
         26      > JMPNZ                                                    ~23, ->12
   16    27    >   MOD                                              ~24     !5, 10000
         28        DIV                                              ~25     ~24, 100
         29        ASSIGN                                                   !6, ~25
   18    30        IS_SMALLER                                               !6, 0
         31      > JMPZ                                                     ~27, ->34
   19    32    >   MUL                                              ~28     !6, -1
         33        ASSIGN                                                   !6, ~28
   22    34    >   CONCAT                                           ~30     !2, '+%3A+'
         35        CONCAT                                           ~31     ~30, !6
         36        ECHO                                                     ~31
   23    37        ECHO                                                     '%0A'
    8    38        PRE_INC                                                  !2
         39    >   IS_SMALLER                                               !2, 1000
         40      > JMPNZ                                                    ~33, ->6
   25    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.2 ms | 1400 KiB | 19 Q