3v4l.org

run code in 500+ PHP versions simultaneously
<?php set_error_handler(function() { throw new \Error(); }); function &gen() { try { yield 1; } catch (Error $e) { print "Caught"; } } foreach (gen() as $y);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/635Mb
function name:  (null)
number of ops:  11
compiled vars:  !0 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          2        SEND_VAL                                                     ~1
          3        DO_ICALL                                                     
   13     4        INIT_FCALL                                                   'gen'
          5        DO_FCALL                                          0  $3      
          6      > FE_RESET_R                                           $4      $3, ->9
          7    > > FE_FETCH_R                                                   $4, !0, ->9
          8    > > JMP                                                          ->7
          9    >   FE_FREE                                                      $4
         10      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/635Mb
function name:  {closure:/in/635Mb:3}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $0      'Error'
          1        DO_FCALL                                          0          
          2      > THROW                                             0          $0
          3*     > RETURN                                                       null

End of Dynamic Function 0

Function gen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 161) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/635Mb
function name:  gen
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   GENERATOR_CREATE                                             
    7     1        YIELD                                                        1
          2      > JMP                                                          ->5
    8     3  E > > CATCH                                           last         'Error'
    9     4    >   ECHO                                                         'Caught'
   11     5    > > GENERATOR_RETURN                                             

End of function gen

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
131.89 ms | 496 KiB | 11 Q