3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { try { yield 3; } finally { throw new Exception(); } } $gen = gen(); $gen->valid(); echo "unset() can throw!\n"; unset($gen);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hXHUl
function name:  (null)
number of ops:  8
compiled vars:  !0 = $gen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'gen'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'valid'
          4        DO_FCALL                                      0          
   15     5        ECHO                                                     'unset%28%29+can+throw%21%0A'
   17     6        UNSET_CV                                                 !0
          7      > 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 = 108) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/hXHUl
function name:  gen
number of ops:  9
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                                                      ->8
    7     4    >   NEW                                              $2      'Exception'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
          7*       FAST_RET                                                 
    9     8    > > GENERATOR_RETURN                                         

End of function gen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.57 ms | 1000 KiB | 14 Q