3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { try { yield 3; } finally { yield 42; yield 1; } } $gen = gen(); $gen->valid(); unset($gen);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3YAZZ
function name:  (null)
number of ops:  7
compiled vars:  !0 = $gen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'gen'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'valid'
          4        DO_FCALL                                      0          
   15     5        UNSET_CV                                                 !0
          6      > RETURN                                                   1

Function gen:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 4, Position 2 = 3
Branch analysis from position: 4
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/3YAZZ
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                                                    3
    6     2      > FAST_CALL                                                ->4
          3    > > JMP                                                      ->7
    7     4    >   YIELD                                                    42
    8     5        YIELD                                                    1
          6      > FAST_RET                                                 
   10     7    > > GENERATOR_RETURN                                         

End of function gen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.54 ms | 1000 KiB | 14 Q