3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_end_flush(); class React_Exception extends Exception{ public $_trace; } class ExceptionHandler { public function __invoke (Exception $e) { ob_end_clean(); waa(); echo $e; } } set_error_handler(function($errorNumber, $errorMessage, $errorFile, $errorLine) { $e = new React_Exception; $e->_trace = debug_backtrace(); throw $e; }); set_exception_handler(new ExceptionHandler()); $a['waa']; echo 'okay';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdcRA
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ob_end_flush'
          1        DO_ICALL                                                 
   17     2        INIT_FCALL                                               'set_error_handler'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYdcRA%3A17%240'
   23     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   25     6        INIT_FCALL                                               'set_exception_handler'
          7        NEW                                              $4      'ExceptionHandler'
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
   27    11        FETCH_DIM_R                                      ~7      !0, 'waa'
         12        FREE                                                     ~7
   29    13        ECHO                                                     'okay'
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FYdcRA%3A17%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YdcRA
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $errorNumber, !1 = $errorMessage, !2 = $errorFile, !3 = $errorLine, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   19     4        NEW                                              $5      'React_Exception'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !4, $5
   20     7        INIT_FCALL                                               'debug_backtrace'
          8        DO_ICALL                                         $9      
          9        ASSIGN_OBJ                                               !4, '_trace'
         10        OP_DATA                                                  $9
   22    11      > THROW                                         0          !4
   23    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYdcRA%3A17%240

Class React_Exception: [no user functions]
Class ExceptionHandler:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdcRA
function name:  __invoke
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'ob_end_clean'
          2        DO_ICALL                                                 
   12     3        INIT_FCALL_BY_NAME                                       'waa'
          4        DO_FCALL                                      0          
   13     5        ECHO                                                     !0
   14     6      > RETURN                                                   null

End of function __invoke

End of class ExceptionHandler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.72 ms | 1400 KiB | 23 Q