3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generator() { yield from gen2(); yield /* comment */ from gen2(); yield from gen2(); yield // comment from gen2(); yield /* comment */ from gen2(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2SI2Q
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   1

Function generator:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/2SI2Q
function name:  generator
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    5     1        INIT_FCALL_BY_NAME                                       'gen2'
          2        DO_FCALL                                      0  $0      
          3        YIELD_FROM                                       ~1      $0
          4        FREE                                                     ~1
    7     5        INIT_FCALL_BY_NAME                                       'gen2'
          6        DO_FCALL                                      0  $2      
          7        YIELD_FROM                                       ~3      $2
          8        FREE                                                     ~3
   11     9        INIT_FCALL_BY_NAME                                       'gen2'
         10        DO_FCALL                                      0  $4      
         11        YIELD_FROM                                       ~5      $4
         12        FREE                                                     ~5
   14    13        INIT_FCALL_BY_NAME                                       'gen2'
         14        DO_FCALL                                      0  $6      
         15        YIELD_FROM                                       ~7      $6
         16        FREE                                                     ~7
   19    17        INIT_FCALL_BY_NAME                                       'gen2'
         18        DO_FCALL                                      0  $8      
         19        YIELD_FROM                                       ~9      $8
         20        FREE                                                     ~9
   20    21      > GENERATOR_RETURN                                         

End of function generator

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.38 ms | 1423 KiB | 13 Q