3v4l.org

run code in 300+ PHP versions simultaneously
<?php $KEY_BASE = str_split("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); $BASE = 62; $num = 11112887; $num = intval($num); $num = array_map('intval',str_split($num)); $result = ''; $remainder = 0; foreach ($num as $digit) { $remainder = $digit/$BASE; echo 'remainder '.$remainder; echo 'key remainder '.$KEY_BASE[$remainder]; $result.=$KEY_BASE[$remainder]; //echo $digit; } echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 30
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/JeSgh
function name:  (null)
number of ops:  33
compiled vars:  !0 = $KEY_BASE, !1 = $BASE, !2 = $num, !3 = $result, !4 = $remainder, !5 = $digit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    4     4        ASSIGN                                                   !1, 62
    5     5        ASSIGN                                                   !2, 11112887
    6     6        CAST                                          4  ~10     !2
          7        ASSIGN                                                   !2, ~10
    7     8        INIT_FCALL                                               'array_map'
          9        SEND_VAL                                                 'intval'
         10        INIT_FCALL                                               'str_split'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $12     
         13        SEND_VAR                                                 $12
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !2, $13
    8    16        ASSIGN                                                   !3, ''
    9    17        ASSIGN                                                   !4, 0
   10    18      > FE_RESET_R                                       $17     !2, ->30
         19    > > FE_FETCH_R                                               $17, !5, ->30
   11    20    >   DIV                                              ~18     !5, !1
         21        ASSIGN                                                   !4, ~18
   12    22        CONCAT                                           ~20     'remainder+', !4
         23        ECHO                                                     ~20
   13    24        FETCH_DIM_R                                      ~21     !0, !4
         25        CONCAT                                           ~22     'key+remainder+', ~21
         26        ECHO                                                     ~22
   14    27        FETCH_DIM_R                                      ~23     !0, !4
         28        ASSIGN_OP                                     8          !3, ~23
   10    29      > JMP                                                      ->19
         30    >   FE_FREE                                                  $17
   17    31        ECHO                                                     !3
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.34 ms | 1388 KiB | 17 Q