3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = [6,5,4,3,2,1,0,7]; $two = [0,1,2,3,4,5,6,7]; // 3 is the answer for($i = 0; $i < count($one); $i++){ if($one[$i] === $two[$i]){ echo "the answer is " . $one[$i] . "\n"; break 1; // remove this line if you want also 7 to show up } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
filename:       /in/HsqWn
function name:  (null)
number of ops:  18
compiled vars:  !0 = $one, !1 = $two, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    8     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->14
    9     4    >   FETCH_DIM_R                                      ~6      !0, !2
          5        FETCH_DIM_R                                      ~7      !1, !2
          6        IS_IDENTICAL                                             ~6, ~7
          7      > JMPZ                                                     ~8, ->13
   10     8    >   FETCH_DIM_R                                      ~9      !0, !2
          9        CONCAT                                           ~10     'the+answer+is+', ~9
         10        CONCAT                                           ~11     ~10, '%0A'
         11        ECHO                                                     ~11
   11    12      > JMP                                                      ->17
    8    13    >   PRE_INC                                                  !2
         14    >   COUNT                                            ~13     !0
         15        IS_SMALLER                                               !2, ~13
         16      > JMPNZ                                                    ~14, ->4
   13    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.37 ms | 994 KiB | 13 Q