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', $serverSeed, $clientSeed); $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/cuE9K
function name:  (null)
number of ops:  60
compiled vars:  !0 = $serverSeed, !1 = $clientSeed, !2 = $nonce, !3 = $seed, !4 = $lucky, !5 = $result_seed, !6 = $result_number, !7 = $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                                           ~12     !0, '-'
          6        CONCAT                                           ~13     ~12, !1
          7        CONCAT                                           ~14     ~13, '-'
          8        CONCAT                                           ~15     ~14, !2
          9        ASSIGN                                                   !3, ~15
   10    10    >   INIT_FCALL                                               'sha1'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $17     
         13        ASSIGN                                                   !3, $17
   11    14        INIT_FCALL                                               'hexdec'
         15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !3
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 8
         19        DO_ICALL                                         $19     
         20        SEND_VAR                                                 $19
         21        DO_ICALL                                         $20     
         22        ASSIGN                                                   !4, $20
   12    23        INIT_FCALL                                               'hash_hmac'
         24        SEND_VAL                                                 'sha512'
         25        SEND_VAR                                                 !0
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $22     
         28        ASSIGN                                                   !5, $22
   13    29        INIT_FCALL                                               'hexdec'
         30        INIT_FCALL                                               'substr'
         31        SEND_VAR                                                 !5
         32        SEND_VAL                                                 0
         33        SEND_VAL                                                 10
         34        DO_ICALL                                         $24     
         35        SEND_VAR                                                 $24
         36        DO_ICALL                                         $25     
         37        ASSIGN                                                   !6, $25
   14    38        IS_SMALLER                                               4294960000, !4
         39      > JMPNZ                                                    ~27, ->10
   16    40    >   MOD                                              ~28     !4, 10000
         41        DIV                                              ~29     ~28, 100
         42        ASSIGN                                                   !7, ~29
   18    43        IS_SMALLER                                               !7, 0
         44      > JMPZ                                                     ~31, ->47
   19    45    >   MUL                                              ~32     !7, -1
         46        ASSIGN                                                   !7, ~32
   21    47    >   ECHO                                                     !5
   22    48        ECHO                                                     !6
   23    49        CONCAT                                           ~34     !2, '%3A'
         50        CONCAT                                           ~35     ~34, !7
         51        ECHO                                                     ~35
   24    52        INIT_FCALL                                               'nl2br'
         53        SEND_VAL                                                 '%0A'
         54        DO_ICALL                                         $36     
         55        ECHO                                                     $36
    7    56        PRE_INC                                                  !2
         57    >   IS_SMALLER                                               !2, 50
         58      > JMPNZ                                                    ~38, ->5
   26    59    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.12 ms | 1400 KiB | 23 Q