3v4l.org

run code in 300+ PHP versions simultaneously
<?php function strxor2($rhs, $lhs) { $result = ''; for ($i = 0; $i < strlen($rhs); $i++) { $result .= chr(ord($rhs[$i]) ^ ord($lhs[$i])); } return $resut; } var_dump(strxor2('1', '2'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I3jFD
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'strxor2'
          2        SEND_VAL                                                 '1'
          3        SEND_VAL                                                 '2'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function strxor2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
Branch analysis from position: 5
filename:       /in/I3jFD
function name:  strxor2
number of ops:  24
compiled vars:  !0 = $rhs, !1 = $lhs, !2 = $result, !3 = $i, !4 = $resut
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, ''
    7     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->19
    8     5    >   INIT_FCALL                                               'chr'
          6        INIT_FCALL                                               'ord'
          7        FETCH_DIM_R                                      ~7      !0, !3
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                         $8      
         10        INIT_FCALL                                               'ord'
         11        FETCH_DIM_R                                      ~9      !1, !3
         12        SEND_VAL                                                 ~9
         13        DO_ICALL                                         $10     
         14        BW_XOR                                           ~11     $8, $10
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        ASSIGN_OP                                     8          !2, $12
    7    18        PRE_INC                                                  !3
         19    >   STRLEN                                           ~15     !0
         20        IS_SMALLER                                               !3, ~15
         21      > JMPNZ                                                    ~16, ->5
   11    22    > > RETURN                                                   !4
   12    23*     > RETURN                                                   null

End of function strxor2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.24 ms | 1399 KiB | 20 Q