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; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/K5V7g
function name:  (null)
number of ops:  30
compiled vars:  !0 = $serverSeed, !1 = $clientSeed, !2 = $nonce, !3 = $seed, !4 = $offset, !5 = $number, !6 = $luckyNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ef2809b1d2b6968a02efaaa3e91e59491326fb0bf4d95c35ace509e96e207033fba4e5f632ebbf4d6035c5bc2bcb081ba8abc1e629c15aea47b3495dbc8aabd2'
    4     1        ASSIGN                                                   !1, 'TWE2SmlF0yOPU5UT'
    5     2        ASSIGN                                                   !2, '14'
   10     3        INIT_FCALL                                               'hash_hmac'
          4        SEND_VAL                                                 'sha512'
          5        CONCAT                                           ~10     !1, '%2C'
          6        CONCAT                                           ~11     ~10, !2
          7        SEND_VAL                                                 ~11
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $12     
         10        ASSIGN                                                   !3, $12
   12    11        ASSIGN                                                   !4, 0
   14    12    >   INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !3
         14        SEND_VAR                                                 !4
         15        SEND_VAL                                                 5
         16        DO_ICALL                                         $15     
         17        ASSIGN                                                   !5, $15
   15    18        INIT_FCALL                                               'hexdec'
         19        SEND_VAR                                                 !5
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !5, $17
   16    22        ASSIGN_OP                                     1          !4, 5
   18    23        IS_SMALLER                                               999999, !5
         24      > JMPNZ                                                    ~20, ->12
   19    25    >   MOD                                              ~21     !5, 10000
         26        DIV                                              ~22     ~21, 100
         27        ASSIGN                                                   !6, ~22
   20    28        ECHO                                                     !6
   21    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
124.5 ms | 462 KiB | 7 Q