3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Uo9kOMrb8Zfx8cHXT65JPNGYEbiYq90YNImYPdLkOo8w8Y8i8cPrRcD1ScSYEY8YB29ZRsvaQNHfRsuYEY91JaGYB29cTMniNsLkT79v8ZfcOMnpPImYRcywABgokJoH7JCmjZcolhT"; function base62_decode ($data) { $outstring = ''; $len = strlen($data); for ($i = 0; $i < $len; $i += 11) { $chunk = substr($data, $i, 11); $outlen = floor((strlen($chunk) * 6) / 8); $y = gmp_strval(gmp_init(ltrim($chunk, '0'), 62), 16); $pad = str_pad($y, $outlen * 2, '0', STR_PAD_LEFT); $outstring .= pack('H*', $pad); } return $outstring; } echo(base62_decode($str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uiuTB
function name:  (null)
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Uo9kOMrb8Zfx8cHXT65JPNGYEbiYq90YNImYPdLkOo8w8Y8i8cPrRcD1ScSYEY8YB29ZRsvaQNHfRsuYEY91JaGYB29cTMniNsLkT79v8ZfcOMnpPImYRcywABgokJoH7JCmjZcolhT'
   18     1        INIT_FCALL                                               'base62_decode'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function base62_decode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 6
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 6
Branch analysis from position: 48
Branch analysis from position: 6
filename:       /in/uiuTB
function name:  base62_decode
number of ops:  50
compiled vars:  !0 = $data, !1 = $outstring, !2 = $len, !3 = $i, !4 = $chunk, !5 = $outlen, !6 = $y, !7 = $pad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, ''
    7     2        STRLEN                                           ~9      !0
          3        ASSIGN                                                   !2, ~9
    8     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->46
    9     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !3
          9        SEND_VAL                                                 11
         10        DO_ICALL                                         $12     
         11        ASSIGN                                                   !4, $12
   10    12        INIT_FCALL                                               'floor'
         13        STRLEN                                           ~14     !4
         14        MUL                                              ~15     ~14, 6
         15        DIV                                              ~16     ~15, 8
         16        SEND_VAL                                                 ~16
         17        DO_ICALL                                         $17     
         18        ASSIGN                                                   !5, $17
   11    19        INIT_FCALL_BY_NAME                                       'gmp_strval'
         20        INIT_FCALL_BY_NAME                                       'gmp_init'
         21        INIT_FCALL                                               'ltrim'
         22        SEND_VAR                                                 !4
         23        SEND_VAL                                                 '0'
         24        DO_ICALL                                         $19     
         25        SEND_VAR_NO_REF_EX                                       $19
         26        SEND_VAL_EX                                              62
         27        DO_FCALL                                      0  $20     
         28        SEND_VAR_NO_REF_EX                                       $20
         29        SEND_VAL_EX                                              16
         30        DO_FCALL                                      0  $21     
         31        ASSIGN                                                   !6, $21
   12    32        INIT_FCALL                                               'str_pad'
         33        SEND_VAR                                                 !6
         34        MUL                                              ~23     !5, 2
         35        SEND_VAL                                                 ~23
         36        SEND_VAL                                                 '0'
         37        SEND_VAL                                                 0
         38        DO_ICALL                                         $24     
         39        ASSIGN                                                   !7, $24
   13    40        INIT_FCALL                                               'pack'
         41        SEND_VAL                                                 'H%2A'
         42        SEND_VAR                                                 !7
         43        DO_ICALL                                         $26     
         44        ASSIGN_OP                                     8          !1, $26
    8    45        ASSIGN_OP                                     1          !3, 11
         46    >   IS_SMALLER                                               !3, !2
         47      > JMPNZ                                                    ~29, ->6
   15    48    > > RETURN                                                   !1
   16    49*     > RETURN                                                   null

End of function base62_decode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.93 ms | 1403 KiB | 24 Q