3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IteratorContainer implements IteratorAggregate { public function getIterator() { $queue = new SqlPriorityQueue(); $queue->insert(3, 3); $queue->insert(2, 2); $queue->insert(1, 1); return $queue; } } foreach (new IteratorContainer as $i) { print_r($i); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/t0OoP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'iteratorcontainer'
   15     1        NEW                                              $1      'IteratorContainer'
          2        DO_FCALL                                      0          
          3      > FE_RESET_R                                       $3      $1, ->9
          4    > > FE_FETCH_R                                               $3, !0, ->9
   16     5    >   INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   15     8      > JMP                                                      ->4
          9    >   FE_FREE                                                  $3
   17    10      > RETURN                                                   1

Class IteratorContainer:
Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0OoP
function name:  getIterator
number of ops:  17
compiled vars:  !0 = $queue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'SqlPriorityQueue'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        INIT_METHOD_CALL                                         !0, 'insert'
          4        SEND_VAL_EX                                              3
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
    8     7        INIT_METHOD_CALL                                         !0, 'insert'
          8        SEND_VAL_EX                                              2
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
    9    11        INIT_METHOD_CALL                                         !0, 'insert'
         12        SEND_VAL_EX                                              1
         13        SEND_VAL_EX                                              1
         14        DO_FCALL                                      0          
   10    15      > RETURN                                                   !0
   11    16*     > RETURN                                                   null

End of function getiterator

End of class IteratorContainer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.49 ms | 1396 KiB | 15 Q