3v4l.org

run code in 500+ PHP versions simultaneously
<?php function decode($encoded, $key) { $strofsym = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM="; $x = 0; while ($x++ <= strlen($strofsym)) { $tmp = md5(md5($key.$strofsym[$x-1]).$key); $encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded); } return base64_decode($encoded); } echo decode('abc', 'abv');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZRf
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                                   'decode'
          1        SEND_VAL                                                     'abc'
          2        SEND_VAL                                                     'abv'
          3        DO_FCALL                                          0  $0      
          4        ECHO                                                         $0
          5      > RETURN                                                       1

Function decode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 5
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 5
Branch analysis from position: 32
Branch analysis from position: 5
filename:       /in/2AZRf
function name:  decode
number of ops:  37
compiled vars:  !0 = $encoded, !1 = $key, !2 = $strofsym, !3 = $x, !4 = $tmp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        ASSIGN                                                       !2, 'qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM%3D'
    8     3        ASSIGN                                                       !3, 0
    9     4      > JMP                                                          ->28
   11     5    >   INIT_FCALL                                                   'md5'
          6        INIT_FCALL                                                   'md5'
          7        SUB                                                  ~7      !3, 1
          8        FETCH_DIM_R                                          ~8      !2, ~7
          9        CONCAT                                               ~9      !1, ~8
         10        SEND_VAL                                                     ~9
         11        DO_ICALL                                             $10     
         12        CONCAT                                               ~11     $10, !1
         13        SEND_VAL                                                     ~11
         14        DO_ICALL                                             $12     
         15        ASSIGN                                                       !4, $12
   12    16        FETCH_DIM_R                                          ~14     !4, 3
         17        FETCH_DIM_R                                          ~15     !4, 6
         18        CONCAT                                               ~16     ~14, ~15
         19        FETCH_DIM_R                                          ~17     !4, 1
         20        CONCAT                                               ~18     ~16, ~17
         21        FETCH_DIM_R                                          ~19     !4, 2
         22        CONCAT                                               ~20     ~18, ~19
   13    23        SUB                                                  ~21     !3, 1
         24        FETCH_DIM_R                                          ~22     !2, ~21
   12    25        FRAMELESS_ICALL_3                str_replace         ~23     ~20, ~22
   13    26        OP_DATA                                                      !0
   12    27        ASSIGN                                                       !0, ~23
    9    28    >   POST_INC                                             ~25     !3
         29        STRLEN                                               ~26     !2
         30        IS_SMALLER_OR_EQUAL                                          ~25, ~26
         31      > JMPNZ                                                        ~27, ->5
   15    32    >   INIT_FCALL                                                   'base64_decode'
         33        SEND_VAR                                                     !0
         34        DO_ICALL                                             $28     
         35      > RETURN                                                       $28
   16    36*     > RETURN                                                       null

End of function decode

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.64 ms | 2038 KiB | 16 Q