3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array(1, 2, 3, 4, 5); foreach ( $items as &$item ) { echo $item."\n"; if ( $item == 2 ) { $item = 9; prev($items); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/kWYhK
function name:  (null)
number of ops:  14
compiled vars:  !0 = $items, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_RW                                      $3      !0, ->12
          2    > > FE_FETCH_RW                                              $3, !1, ->12
    6     3    >   CONCAT                                           ~4      !1, '%0A'
          4        ECHO                                                     ~4
    7     5        IS_EQUAL                                                 !1, 2
          6      > JMPZ                                                     ~5, ->11
    8     7    >   ASSIGN                                                   !1, 9
    9     8        INIT_FCALL                                               'prev'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
    5    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $3
   11    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.46 ms | 1394 KiB | 15 Q