3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator1 = new \AppendIterator(); $events = new \ArrayIterator(['event']); $iterator1->append($events); // without this foreach, i will not hang foreach ($iterator2 as $event) { } $iterator1->append(new \ArrayIterator());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/9O5fu
function name:  (null)
number of ops:  20
compiled vars:  !0 = $iterator1, !1 = $events, !2 = $iterator2, !3 = $event
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'AppendIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        NEW                                              $7      'ArrayIterator'
          4        SEND_VAL_EX                                              <array>
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    5     7        INIT_METHOD_CALL                                         !0, 'append'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
    7    10      > FE_RESET_R                                       $11     !2, ->13
         11    > > FE_FETCH_R                                               $11, !3, ->13
         12    > > JMP                                                      ->11
         13    >   FE_FREE                                                  $11
    9    14        INIT_METHOD_CALL                                         !0, 'append'
         15        NEW                                              $12     'ArrayIterator'
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $12
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.33 ms | 1394 KiB | 13 Q