3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.85 ms | 1395 KiB | 19 Q