3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ary = array(5, 6, 2, 3, 1); foreach($ary as &$a) { echo $a; } // no reset after the first foreach on the a $a = 0; foreach($ary as $a) { echo $a; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/ZPBXg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $ary, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_RW                                      $3      !0, ->5
          2    > > FE_FETCH_RW                                              $3, !1, ->5
    4     3    >   ECHO                                                     !1
    3     4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $3
    8     6        ASSIGN                                                   !1, 0
    9     7      > FE_RESET_R                                       $5      !0, ->11
          8    > > FE_FETCH_R                                               $5, !1, ->11
   10     9    >   ECHO                                                     !1
    9    10      > JMP                                                      ->8
         11    >   FE_FREE                                                  $5
   11    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.38 ms | 1393 KiB | 13 Q