3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array('a', 'b', 'c', 'd', 'e'); foreach ( $items as $outer ) { echo "Outer element: $outer\n"; if ( $outer == 'c' ) { foreach ( $items as $inner ) { echo "Inner element: $inner\n"; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/lJTQG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $items, !1 = $outer, !2 = $inner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                               $4, !1, ->18
    5     3    >   ROPE_INIT                                     3  ~6      'Outer+element%3A+'
          4        ROPE_ADD                                      1  ~6      ~6, !1
          5        ROPE_END                                      2  ~5      ~6, '%0A'
          6        ECHO                                                     ~5
    6     7        IS_EQUAL                                                 !1, 'c'
          8      > JMPZ                                                     ~8, ->17
    7     9    > > FE_RESET_R                                       $9      !0, ->16
         10    > > FE_FETCH_R                                               $9, !2, ->16
    8    11    >   ROPE_INIT                                     3  ~11     'Inner+element%3A+'
         12        ROPE_ADD                                      1  ~11     ~11, !2
         13        ROPE_END                                      2  ~10     ~11, '%0A'
         14        ECHO                                                     ~10
    7    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $9
    4    17    > > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   11    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.08 ms | 995 KiB | 13 Q