3v4l.org

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

Function gen1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/AQtat
function name:  gen1
number of ops:  5
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      > GENERATOR_RETURN                                         
    7     4*     > GENERATOR_RETURN                                         

End of function gen1

Function gen2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/AQtat
function name:  gen2
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   GENERATOR_CREATE                                         
   10     1        INIT_FCALL                                               'gen1'
          2        DO_FCALL                                      0  $1      
          3        YIELD_FROM                                       ~2      $1
          4        ASSIGN                                                   !0, ~2
   11     5      > GENERATOR_RETURN                                         
   12     6*     > GENERATOR_RETURN                                         

End of function gen2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.96 ms | 1397 KiB | 14 Q