3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,2,3,4,5,6]; for($i = 0; $i < count($array); $i++) { } echo "-----"; for($i = 0, $count = count($array); $i < $count; $i++) { }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 12
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 12
Branch analysis from position: 15
Branch analysis from position: 12
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/H1a2X
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $i, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->4
          3    >   PRE_INC                                                  !1
          4    >   COUNT                                            ~6      !0
          5        IS_SMALLER                                               !1, ~6
          6      > JMPNZ                                                    ~7, ->3
    9     7    >   ECHO                                                     '-----'
   12     8        ASSIGN                                                   !1, 0
          9        COUNT                                            ~9      !0
         10        ASSIGN                                                   !2, ~9
         11      > JMP                                                      ->13
         12    >   PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, !2
         14      > JMPNZ                                                    ~12, ->12
   14    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.32 ms | 1394 KiB | 13 Q