3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2, 3, 4, 5); foreach ($array as $item) { echo "$item\n"; $array[] = $item; } foreach ($array as $item) { echo "$item\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 9
filename:       /in/eD7tf
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_R                                       $3      !0, ->9
          2    > > FE_FETCH_R                                               $3, !1, ->9
    4     3    >   NOP                                                      
          4        FAST_CONCAT                                      ~4      !1, '%0A'
          5        ECHO                                                     ~4
    5     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  !1
    3     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
    8    10      > FE_RESET_R                                       $6      !0, ->16
         11    > > FE_FETCH_R                                               $6, !1, ->16
    9    12    >   NOP                                                      
         13        FAST_CONCAT                                      ~7      !1, '%0A'
         14        ECHO                                                     ~7
    8    15      > JMP                                                      ->11
         16    >   FE_FREE                                                  $6
   10    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.66 ms | 1394 KiB | 13 Q