3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.84 ms | 1396 KiB | 15 Q