3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = '8013f9fa199afdae4dc1907040541c2ea2d7b1d1bcb120a19f35e54b2294724b682d79dd29a80c63315ccd20c42b45e56f7889541347b5115e32bdc207a58d33'; $clientSeed = '1117f2bfec3f3c94204ada1e8f927139bb52bb07792e3f8f91216ed6bee444600bb22003de6d77c1f4b2df346e43cc4bcb87'; $nonce = 1; for($nonce =40; $nonce < 50; $nonce++){ $seed = $serverSeed.'-'.$clientSeed.'-'.$nonce; do { $seed = sha1($seed); $lucky = hexdec(substr($seed,0,8)); $result_seed = hash_hmac('sha512', $server_seed, $client_seed); $result_number = hexdec(substr($result_seed,0,10)); } while ($lucky > 4294960000); $luckyNumber = ($lucky % 10000) / 100; if ($luckyNumber < 0) $luckyNumber = -$luckyNumber; echo $result_seed; echo $result_number; echo $nonce.":".$luckyNumber; echo nl2br ("\n"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 5
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 10
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 5
Branch analysis from position: 59
Branch analysis from position: 5
Branch analysis from position: 47
Branch analysis from position: 10
filename:       /in/GTAq5
function name:  (null)
number of ops:  60
compiled vars:  !0 = $serverSeed, !1 = $clientSeed, !2 = $nonce, !3 = $seed, !4 = $lucky, !5 = $result_seed, !6 = $server_seed, !7 = $client_seed, !8 = $result_number, !9 = $luckyNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '8013f9fa199afdae4dc1907040541c2ea2d7b1d1bcb120a19f35e54b2294724b682d79dd29a80c63315ccd20c42b45e56f7889541347b5115e32bdc207a58d33'
    4     1        ASSIGN                                                   !1, '1117f2bfec3f3c94204ada1e8f927139bb52bb07792e3f8f91216ed6bee444600bb22003de6d77c1f4b2df346e43cc4bcb87'
    5     2        ASSIGN                                                   !2, 1
    7     3        ASSIGN                                                   !2, 40
          4      > JMP                                                      ->57
    8     5    >   CONCAT                                           ~14     !0, '-'
          6        CONCAT                                           ~15     ~14, !1
          7        CONCAT                                           ~16     ~15, '-'
          8        CONCAT                                           ~17     ~16, !2
          9        ASSIGN                                                   !3, ~17
   10    10    >   INIT_FCALL                                               'sha1'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $19     
         13        ASSIGN                                                   !3, $19
   11    14        INIT_FCALL                                               'hexdec'
         15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !3
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 8
         19        DO_ICALL                                         $21     
         20        SEND_VAR                                                 $21
         21        DO_ICALL                                         $22     
         22        ASSIGN                                                   !4, $22
   12    23        INIT_FCALL                                               'hash_hmac'
         24        SEND_VAL                                                 'sha512'
         25        SEND_VAR                                                 !6
         26        SEND_VAR                                                 !7
         27        DO_ICALL                                         $24     
         28        ASSIGN                                                   !5, $24
   13    29        INIT_FCALL                                               'hexdec'
         30        INIT_FCALL                                               'substr'
         31        SEND_VAR                                                 !5
         32        SEND_VAL                                                 0
         33        SEND_VAL                                                 10
         34        DO_ICALL                                         $26     
         35        SEND_VAR                                                 $26
         36        DO_ICALL                                         $27     
         37        ASSIGN                                                   !8, $27
   14    38        IS_SMALLER                                               4294960000, !4
         39      > JMPNZ                                                    ~29, ->10
   16    40    >   MOD                                              ~30     !4, 10000
         41        DIV                                              ~31     ~30, 100
         42        ASSIGN                                                   !9, ~31
   18    43        IS_SMALLER                                               !9, 0
         44      > JMPZ                                                     ~33, ->47
   19    45    >   MUL                                              ~34     !9, -1
         46        ASSIGN                                                   !9, ~34
   21    47    >   ECHO                                                     !5
   22    48        ECHO                                                     !8
   23    49        CONCAT                                           ~36     !2, '%3A'
         50        CONCAT                                           ~37     ~36, !9
         51        ECHO                                                     ~37
   24    52        INIT_FCALL                                               'nl2br'
         53        SEND_VAL                                                 '%0A'
         54        DO_ICALL                                         $38     
         55        ECHO                                                     $38
    7    56        PRE_INC                                                  !2
         57    >   IS_SMALLER                                               !2, 50
         58      > JMPNZ                                                    ~40, ->5
   26    59    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.53 ms | 1400 KiB | 23 Q