3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; // make some array for testing for($i=0; $i < 100; $i++) $array["key$i"] = $i; for($i=0; $i < 1000000; $i++) { foreach ($array as $firstKey => $value) { break; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
Branch analysis from position: 12
Branch analysis from position: 17
Branch analysis from position: 17
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/gRoGD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $i, !2 = $value, !3 = $firstKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->8
    6     3    >   NOP                                                      
          4        FAST_CONCAT                                      ~6      'key', !1
          5        ASSIGN_DIM                                               !0, ~6
          6        OP_DATA                                                  !1
    5     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 100
          9      > JMPNZ                                                    ~9, ->3
    8    10    >   ASSIGN                                                   !1, 0
         11      > JMP                                                      ->19
    9    12    > > FE_RESET_R                                       $11     !0, ->17
         13    > > FE_FETCH_R                                       ~12     $11, !2, ->17
         14    >   ASSIGN                                                   !3, ~12
   10    15      > JMP                                                      ->17
    9    16*       JMP                                                      ->13
         17    >   FE_FREE                                                  $11
    8    18        PRE_INC                                                  !1
         19    >   IS_SMALLER                                               !1, 1000000
         20      > JMPNZ                                                    ~15, ->12
   12    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.78 ms | 1435 KiB | 13 Q