3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.23 ms | 1394 KiB | 13 Q