3v4l.org

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

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

End of function q

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.91 ms | 941 KiB | 19 Q