3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,3,4,5,6,7,8,9,10); foreach (new LimitIterator(new InfiniteIterator(new ArrayIterator($a)), 2, count($a)) as $v) { echo $v; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/uAd3h
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $3      'LimitIterator'
          2        NEW                                              $4      'InfiniteIterator'
          3        NEW                                              $5      'ArrayIterator'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $5
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $4
          9        SEND_VAL_EX                                              2
         10        COUNT                                            ~8      !0
         11        SEND_VAL_EX                                              ~8
         12        DO_FCALL                                      0          
         13      > FE_RESET_R                                       $10     $3, ->17
         14    > > FE_FETCH_R                                               $10, !1, ->17
    5    15    >   ECHO                                                     !1
    4    16      > JMP                                                      ->14
         17    >   FE_FREE                                                  $10
    6    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.93 ms | 1394 KiB | 13 Q