3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_exception_handler("custom_exception_handler"); function custom_exception_handler($e){ echo "foo"; //exit; } throw new Exception("bar"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/LTXcD
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'custom_exception_handler'
          2        DO_ICALL                                                 
    8     3        NEW                                              $1      'Exception'
          4        SEND_VAL_EX                                              'bar'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $1
    9     7*     > RETURN                                                   1

Function custom_exception_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LTXcD
function name:  custom_exception_handler
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                                                     'foo'
    6     2      > RETURN                                                   null

End of function custom_exception_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1385 KiB | 15 Q