3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '4111111111111111'; //$str = '4556494730120644'; $str = 'xxxxxxxxxxxx1111'; $sKey = '8519293193919192153'; $s = ''; $j = 0; for($i=0;$i < strlen($str);$i++) { $s .= chr( ord(substr($str,$i,1)) + ord(substr($sKey,$j++,1))); if($j==strlen($sKey)) $j=0; } ; echo utf8_decode($s); echo "\n"; echo utf8_encode($s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
Branch analysis from position: 7
Branch analysis from position: 33
filename:       /in/B63vQ
function name:  (null)
number of ops:  47
compiled vars:  !0 = $str, !1 = $sKey, !2 = $s, !3 = $j, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '4111111111111111'
    5     1        ASSIGN                                                   !0, 'xxxxxxxxxxxx1111'
    6     2        ASSIGN                                                   !1, '8519293193919192153'
    7     3        ASSIGN                                                   !2, ''
    8     4        ASSIGN                                                   !3, 0
   10     5        ASSIGN                                                   !4, 0
          6      > JMP                                                      ->34
   12     7    >   INIT_FCALL                                               'chr'
          8        INIT_FCALL                                               'ord'
          9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !4
         12        SEND_VAL                                                 1
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                         $12     
         16        INIT_FCALL                                               'ord'
         17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !1
         19        POST_INC                                         ~13     !3
         20        SEND_VAL                                                 ~13
         21        SEND_VAL                                                 1
         22        DO_ICALL                                         $14     
         23        SEND_VAR                                                 $14
         24        DO_ICALL                                         $15     
         25        ADD                                              ~16     $12, $15
         26        SEND_VAL                                                 ~16
         27        DO_ICALL                                         $17     
         28        ASSIGN_OP                                     8          !2, $17
   13    29        STRLEN                                           ~19     !1
         30        IS_EQUAL                                                 !3, ~19
         31      > JMPZ                                                     ~20, ->33
   14    32    >   ASSIGN                                                   !3, 0
   10    33    >   PRE_INC                                                  !4
         34    >   STRLEN                                           ~23     !0
         35        IS_SMALLER                                               !4, ~23
         36      > JMPNZ                                                    ~24, ->7
   18    37    >   INIT_FCALL                                               'utf8_decode'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $25     
         40        ECHO                                                     $25
   19    41        ECHO                                                     '%0A'
   21    42        INIT_FCALL                                               'utf8_encode'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $26     
         45        ECHO                                                     $26
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.31 ms | 1400 KiB | 23 Q