3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = new \ArrayIterator([]); $toMerge = new \ArrayIterator(["a" => 1]); $iterator = new \AppendIterator; $iterator->append($source); $iterator->append($toMerge); var_dump($iterator);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2cidk
function name:  (null)
number of ops:  21
compiled vars:  !0 = $source, !1 = $toMerge, !2 = $iterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'ArrayIterator'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    5     8        NEW                                              $9      'AppendIterator'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
    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        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.04 ms | 1395 KiB | 15 Q