3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A extends \Traversable { } trait T { protected $items = []; public function getIterator() { return new \ArrayIterator($this->items); } } class C implements A, IteratorAggregate { use T; } $c = new C();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uQP44
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'a'
   15     1        DECLARE_CLASS                                            'c'
   19     2        NEW                                              $1      'C'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
          5      > RETURN                                                   1

Class A: [no user functions]
Class T:
Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uQP44
function name:  getIterator
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'ArrayIterator'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $1      'items'
          3        SEND_FUNC_ARG                                            $1
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $0
   12     6*     > RETURN                                                   null

End of function getiterator

End of class T.

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.27 ms | 1393 KiB | 13 Q