3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator = new \AppendIterator(); $events = new \ArrayIterator([1,2,3,4,5]); $iterator->append($events); $events->next(); while($iterator->valid()) { echo $iterator->current(), "\n"; $iterator->next(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 13
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 13
Branch analysis from position: 22
Branch analysis from position: 13
filename:       /in/EavLv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $iterator, !1 = $events
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'AppendIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        NEW                                              $5      'ArrayIterator'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    5     7        INIT_METHOD_CALL                                         !0, 'append'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
    7    10        INIT_METHOD_CALL                                         !1, 'next'
         11        DO_FCALL                                      0          
    9    12      > JMP                                                      ->19
   10    13    >   INIT_METHOD_CALL                                         !0, 'current'
         14        DO_FCALL                                      0  $10     
         15        ECHO                                                     $10
         16        ECHO                                                     '%0A'
   11    17        INIT_METHOD_CALL                                         !0, 'next'
         18        DO_FCALL                                      0          
    9    19    >   INIT_METHOD_CALL                                         !0, 'valid'
         20        DO_FCALL                                      0  $12     
         21      > JMPNZ                                                    $12, ->13
   12    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.51 ms | 1385 KiB | 13 Q