3v4l.org

run code in 500+ PHP versions simultaneously
<?php function InstrumentHash($serial) { $prefix = "_a_" .trim("placeholder_" . chr(32+((int)($serial/8))%64)); $multiplier = 73 + (int)($serial/9); return md5($prefix . (string)($multiplier*$serial)); } function InstrumentPassword($serial, $len) { $pswtbl = "123456789ABCDEFGHKMNPRSTUVWX"; $tlen = strlen($pswtbl); srand($serial); $pass = ""; if ($len >= 16); $len = 16; for (; $i<$len; $i++) { $val = ($serial * 73 + rand()%8791) % $tlen; $pass .= $pswtbl[$val]; } return $pass; } function InstrumentSSID($serial, $instname, &$ssid, &$psk) { $passtable = "abicdefghiknsetuv123a45i67e89"; srand($serial); $ssid = $instname . sprintf("%04d",rand(0,9999)); $psk = ""; for ($i=0; $i<8; $i++) { $t = rand(0,strlen($passtable)-1); $psk .= $passtable[$t]; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9LCQS
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E > > RETURN                                                   1

Function instrumenthash:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9LCQS
function name:  InstrumentHash
number of ops:  26
compiled vars:  !0 = $serial, !1 = $prefix, !2 = $multiplier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'chr'
          3        DIV                                              ~3      !0, 8
          4        CAST                                          4  ~4      ~3
          5        MOD                                              ~5      ~4, 64
          6        ADD                                              ~6      32, ~5
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9        CONCAT                                           ~8      'placeholder_', $7
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        CONCAT                                           ~10     '_a_', $9
         13        ASSIGN                                                   !1, ~10
    6    14        DIV                                              ~12     !0, 9
         15        CAST                                          4  ~13     ~12
         16        ADD                                              ~14     73, ~13
         17        ASSIGN                                                   !2, ~14
    8    18        INIT_FCALL                                               'md5'
         19        MUL                                              ~16     !2, !0
         20        CAST                                          6  ~17     ~16
         21        CONCAT                                           ~18     !1, ~17
         22        SEND_VAL                                                 ~18
         23        DO_ICALL                                         $19     
         24      > RETURN                                                   $19
    9    25*     > RETURN                                                   null

End of function instrumenthash

Function instrumentpassword:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
Branch analysis from position: 13
Branch analysis from position: 11
filename:       /in/9LCQS
function name:  InstrumentPassword
number of ops:  27
compiled vars:  !0 = $serial, !1 = $len, !2 = $pswtbl, !3 = $tlen, !4 = $pass, !5 = $val, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        ASSIGN                                                   !2, '123456789ABCDEFGHKMNPRSTUVWX'
   14     3        STRLEN                                           ~8      !2
          4        ASSIGN                                                   !3, ~8
   16     5        INIT_FCALL                                               'srand'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   18     8        ASSIGN                                                   !4, ''
   19     9        IS_SMALLER_OR_EQUAL                                      16, !1
         10      > JMPZ                                                     ~12, ->11
   20    11    >   ASSIGN                                                   !1, 16
   22    12      > JMP                                                      ->23
   24    13    >   MUL                                              ~14     !0, 73
         14        INIT_FCALL                                               'rand'
         15        DO_ICALL                                         $15     
         16        MOD                                              ~16     $15, 8791
         17        ADD                                              ~17     ~14, ~16
         18        MOD                                              ~18     ~17, !3
         19        ASSIGN                                                   !5, ~18
   25    20        FETCH_DIM_R                                      ~20     !2, !5
         21        ASSIGN_OP                                     8          !4, ~20
   22    22        PRE_INC                                                  !6
         23    >   IS_SMALLER                                               !6, !1
         24      > JMPNZ                                                    ~23, ->13
   28    25    > > RETURN                                                   !4
   29    26*     > RETURN                                                   null

End of function instrumentpassword

Function instrumentssid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 21
Branch analysis from position: 33
Branch analysis from position: 21
filename:       /in/9LCQS
function name:  InstrumentSSID
number of ops:  34
compiled vars:  !0 = $serial, !1 = $instname, !2 = $ssid, !3 = $psk, !4 = $passtable, !5 = $i, !6 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   33     4        ASSIGN                                                   !4, 'abicdefghiknsetuv123a45i67e89'
   35     5        INIT_FCALL                                               'srand'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   37     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 '%2504d'
         10        INIT_FCALL                                               'rand'
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 9999
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                         $10     
         16        CONCAT                                           ~11     !1, $10
         17        ASSIGN                                                   !2, ~11
   38    18        ASSIGN                                                   !3, ''
   40    19        ASSIGN                                                   !5, 0
         20      > JMP                                                      ->31
   42    21    >   INIT_FCALL                                               'rand'
         22        SEND_VAL                                                 0
         23        STRLEN                                           ~15     !4
         24        SUB                                              ~16     ~15, 1
         25        SEND_VAL                                                 ~16
         26        DO_ICALL                                         $17     
         27        ASSIGN                                                   !6, $17
   43    28        FETCH_DIM_R                                      ~19     !4, !6
         29        ASSIGN_OP                                     8          !3, ~19
   40    30        PRE_INC                                                  !5
         31    >   IS_SMALLER                                               !5, 8
         32      > JMPNZ                                                    ~22, ->21
   45    33    > > RETURN                                                   null

End of function instrumentssid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.95 ms | 1322 KiB | 19 Q