3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen(): Generator { yield 1; var_dump(debug_backtrace()); } for ($gen = gen(); $gen->valid(); $gen->next()) { $gen->current(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/XOgoU
function name:  (null)
number of ops:  12
compiled vars:  !0 = $gen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'gen'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
          3      > JMP                                                      ->8
   11     4    >   INIT_METHOD_CALL                                         !0, 'current'
          5        DO_FCALL                                      0          
   10     6        INIT_METHOD_CALL                                         !0, 'next'
          7        DO_FCALL                                      0          
          8    >   INIT_METHOD_CALL                                         !0, 'valid'
          9        DO_FCALL                                      0  $5      
         10      > JMPNZ                                                    $5, ->4
   12    11    > > RETURN                                                   1

Function gen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/XOgoU
function name:  gen
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    5     1        YIELD                                                    1
    7     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'debug_backtrace'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
    8     7      > GENERATOR_RETURN                                         

End of function gen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.42 ms | 988 KiB | 16 Q