3v4l.org

run code in 300+ PHP versions simultaneously
<?php function evangel($data, $key) { $alphabet = range('a', 'z'); $cryptoAlphabet = array(); for($i=0;$i<26;$i++) { $index = $i+$key; if($i+$key > 25) $index = (($i+$key)%25)-1; $cryptoAlphabet[$i] = $alphabet[$index]; } $cryptedData = strtr($data, array_combine($alphabet, $cryptoAlphabet)); return $cryptedData; } echo evangel('aacceett', 7);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4o5IY
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'evangel'
          1        SEND_VAL                                                 'aacceett'
          2        SEND_VAL                                                 7
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function evangel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 10
Branch analysis from position: 25
Branch analysis from position: 10
Branch analysis from position: 19
filename:       /in/4o5IY
function name:  evangel
number of ops:  36
compiled vars:  !0 = $data, !1 = $key, !2 = $alphabet, !3 = $cryptoAlphabet, !4 = $i, !5 = $index, !6 = $cryptedData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 'a'
          4        SEND_VAL                                                 'z'
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    6     7        ASSIGN                                                   !3, <array>
    8     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->23
    9    10    >   ADD                                              ~11     !4, !1
         11        ASSIGN                                                   !5, ~11
   10    12        ADD                                              ~13     !4, !1
         13        IS_SMALLER                                               25, ~13
         14      > JMPZ                                                     ~14, ->19
         15    >   ADD                                              ~15     !4, !1
         16        MOD                                              ~16     ~15, 25
         17        SUB                                              ~17     ~16, 1
         18        ASSIGN                                                   !5, ~17
   12    19    >   FETCH_DIM_R                                      ~20     !2, !5
         20        ASSIGN_DIM                                               !3, !4
         21        OP_DATA                                                  ~20
    8    22        PRE_INC                                                  !4
         23    >   IS_SMALLER                                               !4, 26
         24      > JMPNZ                                                    ~22, ->10
   15    25    >   INIT_FCALL                                               'strtr'
         26        SEND_VAR                                                 !0
         27        INIT_FCALL                                               'array_combine'
         28        SEND_VAR                                                 !2
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                         $23     
         31        SEND_VAR                                                 $23
         32        DO_ICALL                                         $24     
         33        ASSIGN                                                   !6, $24
   17    34      > RETURN                                                   !6
   18    35*     > RETURN                                                   null

End of function evangel

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.46 ms | 1020 KiB | 17 Q