3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExceptionHandler { public function __construct() { set_exception_handler($this); } public function __invoke(Exception $e) { echo $exception->getMessage(); } } new ExceptionHandler; throw new Exception("Test");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Qt2bB
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'ExceptionHandler'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
   18     3        NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'Test'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
          7*     > RETURN                                                   1

Class ExceptionHandler:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qt2bB
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    8     4      > RETURN                                                   null

End of function __construct

Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qt2bB
function name:  __invoke
number of ops:  5
compiled vars:  !0 = $e, !1 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         !1, 'getMessage'
          2        DO_FCALL                                      0  $2      
          3        ECHO                                                     $2
   13     4      > RETURN                                                   null

End of function __invoke

End of class ExceptionHandler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.1 ms | 1395 KiB | 15 Q