3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'cat'; $b = 'cats'; $result = 0; for ($i = 0; $i < strlen($a); $i++) { $result |= (ord($a[$i]) ^ ord($b[$i])); } $c = ($result == 0) ? "equal" : "not equal";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 5
Branch analysis from position: 19
Branch analysis from position: 5
filename:       /in/nC79W
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $b, !2 = $result, !3 = $i, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'cat'
    3     1        ASSIGN                                                   !1, 'cats'
    4     2        ASSIGN                                                   !2, 0
    5     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->16
    6     5    >   INIT_FCALL                                               'ord'
          6        FETCH_DIM_R                                      ~9      !0, !3
          7        SEND_VAL                                                 ~9
          8        DO_ICALL                                         $10     
          9        INIT_FCALL                                               'ord'
         10        FETCH_DIM_R                                      ~11     !1, !3
         11        SEND_VAL                                                 ~11
         12        DO_ICALL                                         $12     
         13        BW_XOR                                           ~13     $10, $12
         14        ASSIGN_OP                                     9          !2, ~13
    5    15        PRE_INC                                                  !3
         16    >   STRLEN                                           ~16     !0
         17        IS_SMALLER                                               !3, ~16
         18      > JMPNZ                                                    ~17, ->5
    8    19    >   IS_EQUAL                                                 !2, 0
         20      > JMPZ                                                     ~18, ->23
         21    >   QM_ASSIGN                                        ~19     'equal'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~19     'not+equal'
         24    >   ASSIGN                                                   !4, ~19
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.27 ms | 1400 KiB | 15 Q