3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1, 2, 3, 4, 5, 6); $j = 0; for($i=0; $i<count($arr); $i++) { echo $j++, PHP_EOL; if ($i == 3 || $i == 4) { unset($arr[$i]); } }
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 = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
Branch analysis from position: 13
Branch analysis from position: 11
filename:       /in/GN6eh
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $j, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->14
    5     4    >   POST_INC                                         ~6      !1
          5        ECHO                                                     ~6
          6        ECHO                                                     '%0A'
    6     7        IS_EQUAL                                         ~7      !2, 3
          8      > JMPNZ_EX                                         ~7      ~7, ->11
          9    >   IS_EQUAL                                         ~8      !2, 4
         10        BOOL                                             ~7      ~8
         11    > > JMPZ                                                     ~7, ->13
    7    12    >   UNSET_DIM                                                !0, !2
    4    13    >   PRE_INC                                                  !2
         14    >   COUNT                                            ~10     !0
         15        IS_SMALLER                                               !2, ~10
         16      > JMPNZ                                                    ~11, ->4
    9    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.47 ms | 1394 KiB | 13 Q