3v4l.org

run code in 300+ PHP versions simultaneously
<?php $it = new \AppendIterator(); $a1 = new \ArrayIterator([1,2,3]); $a2 = new \ArrayIterator([1,2,3]); $it->append($a1); $it->append($a2); echo 'ONE:'; foreach($it as $val){ echo $val; } echo 'TWO:'; foreach($it as $val){ echo $val; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 22
filename:       /in/IQ4SK
function name:  (null)
number of ops:  30
compiled vars:  !0 = $it, !1 = $a1, !2 = $a2, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $4      'AppendIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    5     3        NEW                                              $7      'ArrayIterator'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    6     7        NEW                                              $10     'ArrayIterator'
          8        SEND_VAL_EX                                              <array>
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
    8    11        INIT_METHOD_CALL                                         !0, 'append'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
    9    14        INIT_METHOD_CALL                                         !0, 'append'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0          
   10    17        ECHO                                                     'ONE%3A'
   11    18      > FE_RESET_R                                       $15     !0, ->22
         19    > > FE_FETCH_R                                               $15, !3, ->22
   13    20    >   ECHO                                                     !3
   11    21      > JMP                                                      ->19
         22    >   FE_FREE                                                  $15
   15    23        ECHO                                                     'TWO%3A'
   16    24      > FE_RESET_R                                       $16     !0, ->28
         25    > > FE_FETCH_R                                               $16, !3, ->28
   18    26    >   ECHO                                                     !3
   16    27      > JMP                                                      ->25
         28    >   FE_FREE                                                  $16
   19    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.07 ms | 1395 KiB | 13 Q