3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.94 ms | 1395 KiB | 15 Q