3v4l.org

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

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

End of function __invoke

End of class ExceptionHandler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.99 ms | 1394 KiB | 13 Q