3v4l.org

run code in 300+ 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 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 5
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 5
Branch analysis from position: 35
Branch analysis from position: 5
filename:       /in/2AZRf
function name:  decode
number of ops:  40
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                                                      ->31
   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        INIT_FCALL                                               'str_replace'
         17        FETCH_DIM_R                                      ~14     !4, 3
         18        FETCH_DIM_R                                      ~15     !4, 6
         19        CONCAT                                           ~16     ~14, ~15
         20        FETCH_DIM_R                                      ~17     !4, 1
         21        CONCAT                                           ~18     ~16, ~17
         22        FETCH_DIM_R                                      ~19     !4, 2
         23        CONCAT                                           ~20     ~18, ~19
         24        SEND_VAL                                                 ~20
   13    25        SUB                                              ~21     !3, 1
         26        FETCH_DIM_R                                      ~22     !2, ~21
         27        SEND_VAL                                                 ~22
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $23     
   12    30        ASSIGN                                                   !0, $23
    9    31    >   POST_INC                                         ~25     !3
         32        STRLEN                                           ~26     !2
         33        IS_SMALLER_OR_EQUAL                                      ~25, ~26
         34      > JMPNZ                                                    ~27, ->5
   15    35    >   INIT_FCALL                                               'base64_decode'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                         $28     
         38      > RETURN                                                   $28
   16    39*     > RETURN                                                   null

End of function decode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.53 ms | 1407 KiB | 20 Q