3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
132.91 ms | 478 KiB | 8 Q