3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo implements IteratorAggregate { public function getIterator() { yield from ['A', 'B', 'C']; yield from ['D', 'E', 'F']; } } print_r(iterator_to_array(new Foo()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H07Ot
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'foo'
   13     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'iterator_to_array'
          3        NEW                                              $0      'Foo'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Foo:
Function getiterator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/H07Ot
function name:  getIterator
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GENERATOR_CREATE                                         
    8     1        YIELD_FROM                                       ~0      <array>
          2        FREE                                                     ~0
    9     3        YIELD_FROM                                       ~1      <array>
          4        FREE                                                     ~1
   10     5      > GENERATOR_RETURN                                         

End of function getiterator

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.02 ms | 1395 KiB | 17 Q