3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen($g) { yield from $g; } foreach(gen($this) as $val) { var_dump($val); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/V1feW
function name:  (null)
number of ops:  12
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'gen'
          1        FETCH_THIS                                       ~1      
          2        SEND_VAL                                                 ~1
          3        DO_FCALL                                      0  $2      
          4      > FE_RESET_R                                       $3      $2, ->10
          5    > > FE_FETCH_R                                               $3, !0, ->10
    8     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    7     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $3
    9    11      > RETURN                                                   1

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

End of function gen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.92 ms | 1397 KiB | 16 Q