3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149 ms | 1473 KiB | 16 Q