3v4l.org

run code in 300+ PHP versions simultaneously
<?php function user_exception_handler_02(Throwable $ex) { restore_exception_handler(); throw new RuntimeException("Not able to handle, throwing another exception from handler"); echo "Should never see this"; } function throw_it() { throw new RuntimeException('Expected unexpected happened'); } function call_throw_it() { throw_it(); } set_exception_handler('user_exception_handler_02'); call_throw_it();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hct7c
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'user_exception_handler_02'
          2        DO_ICALL                                                 
   19     3        INIT_FCALL                                               'call_throw_it'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function user_exception_handler_02:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Hct7c
function name:  user_exception_handler_02
number of ops:  9
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'restore_exception_handler'
          2        DO_ICALL                                                 
    5     3        NEW                                              $2      'RuntimeException'
          4        SEND_VAL_EX                                              'Not+able+to+handle%2C+throwing+another+exception+from+handler'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    6     7*       ECHO                                                     'Should+never+see+this'
    7     8*     > RETURN                                                   null

End of function user_exception_handler_02

Function throw_it:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Hct7c
function name:  throw_it
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $0      'RuntimeException'
          1        SEND_VAL_EX                                              'Expected+unexpected+happened'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   11     4*     > RETURN                                                   null

End of function throw_it

Function call_throw_it:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hct7c
function name:  call_throw_it
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'throw_it'
          1        DO_FCALL                                      0          
   15     2      > RETURN                                                   null

End of function call_throw_it

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.12 ms | 1002 KiB | 17 Q