3v4l.org

run code in 500+ PHP versions simultaneously
<?php function yieldItems() { yield 1; yield 2; yield 3; yield from [4, 5, 6]; yield from [7, 8, 9]; } var_dump( iterator_to_array( yieldItems() ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jFDXh
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                                   'var_dump'
   12     1        INIT_FCALL                                                   'iterator_to_array'
   13     2        INIT_FCALL                                                   'yielditems'
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR                                                     $0
   12     5        DO_ICALL                                             $1      
   13     6        SEND_VAR                                                     $1
   11     7        DO_ICALL                                                     
   15     8      > RETURN                                                       1

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

End of function yielditems

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.14 ms | 1975 KiB | 16 Q