3v4l.org

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

Function exceptionhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEYS8
function name:  exceptionHandler
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+exceptionHandler%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
    4     1        NEW                                              $0      'foo'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
    5     4      > RETURN                                                   null

End of function exceptionhandler

Function errorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oEYS8
function name:  errorHandler
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+errorHandler%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
    8     1        NEW                                              $0      'bar'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
    9     4      > RETURN                                                   null

End of function errorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.55 ms | 941 KiB | 18 Q