3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator1 = new \AppendIterator(); $iterator2 = new \AppendIterator(); $events = new \ArrayIterator(['event']); $iterator1->append($events); $iterator2->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 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/2J8Bu
function name:  (null)
number of ops:  26
compiled vars:  !0 = $iterator1, !1 = $iterator2, !2 = $events, !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      'AppendIterator'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
    5     6        NEW                                              $10     'ArrayIterator'
          7        SEND_VAL_EX                                              <array>
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $10
    6    10        INIT_METHOD_CALL                                         !0, 'append'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0          
    7    13        INIT_METHOD_CALL                                         !1, 'append'
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
    9    16      > FE_RESET_R                                       $15     !1, ->19
         17    > > FE_FETCH_R                                               $15, !3, ->19
         18    > > JMP                                                      ->17
         19    >   FE_FREE                                                  $15
   11    20        INIT_METHOD_CALL                                         !0, 'append'
         21        NEW                                              $16     'ArrayIterator'
         22        DO_FCALL                                      0          
         23        SEND_VAR_NO_REF_EX                                       $16
         24        DO_FCALL                                      0          
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.06 ms | 1394 KiB | 13 Q