3v4l.org

run code in 500+ PHP versions simultaneously
<?php set_exception_handler(function($e){ echo "exception handled"; // not echoed }); register_shutdown_function(function(){ throw new Exception("test"); // this should be caught by the exception handler above, but it doesn't });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dv51A
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'set_exception_handler'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    5     2        SEND_VAL                                                     ~0
    3     3        DO_ICALL                                                     
    6     4        INIT_FCALL                                                   'register_shutdown_function'
          5        DECLARE_LAMBDA_FUNCTION                              ~2      [1]
    8     6        SEND_VAL                                                     ~2
    6     7        DO_ICALL                                                     
    8     8      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dv51A
function name:  {closure:/in/Dv51A:3}
number of ops:  3
compiled vars:  !0 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ECHO                                                         'exception+handled'
    5     2      > RETURN                                                       null

End of Dynamic Function 0

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

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
197.92 ms | 2684 KiB | 14 Q