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 = ''; foreach ($num as $digit) { $remainder = $digit%$BASE; $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 = 25
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/8lAEr
function name:  (null)
number of ops:  28
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
    3     4        ASSIGN                                                   !1, 62
    4     5        ASSIGN                                                   !2, 11112887
    5     6        CAST                                          4  ~10     !2
          7        ASSIGN                                                   !2, ~10
    6     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
    7    16        ASSIGN                                                   !3, ''
    8    17        ASSIGN                                                   !4, ''
    9    18      > FE_RESET_R                                       $17     !2, ->25
         19    > > FE_FETCH_R                                               $17, !5, ->25
   10    20    >   MOD                                              ~18     !5, !1
         21        ASSIGN                                                   !4, ~18
   11    22        FETCH_DIM_R                                      ~20     !0, !4
         23        ASSIGN_OP                                     8          !3, ~20
    9    24      > JMP                                                      ->19
         25    >   FE_FREE                                                  $17
   14    26        ECHO                                                     !3
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.08 ms | 1396 KiB | 17 Q