3v4l.org

run code in 300+ PHP versions simultaneously
<?php function __fatalHandler() { $error = error_get_last(); //check if it's a core/fatal error, otherwise it's a normal shutdown if($error !== NULL && $error['type'] === E_ERROR) { //Bit hackish, but the set_exception_handler will return the old handler function fakeHandler() { } $handler = set_exception_handler('fakeHandler'); restore_exception_handler(); if($handler !== null) { call_user_func($handler, new ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); } exit; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ji5GF
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   1

Function __fatalhandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 37
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 36
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Ji5GF
function name:  __fatalHandler
number of ops:  38
compiled vars:  !0 = $error, !1 = $handler
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $2      
          2        ASSIGN                                                   !0, $2
    8     3        TYPE_CHECK                                  1020  ~4      !0
          4      > JMPZ_EX                                          ~4      ~4, ->8
          5    >   FETCH_DIM_R                                      ~5      !0, 'type'
          6        IS_IDENTICAL                                     ~6      ~5, 1
          7        BOOL                                             ~4      ~6
          8    > > JMPZ                                                     ~4, ->37
   10     9    >   DECLARE_FUNCTION                                         'fakehandler'
   11    10        INIT_FCALL                                               'set_exception_handler'
         11        SEND_VAL                                                 'fakeHandler'
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   12    14        INIT_FCALL                                               'restore_exception_handler'
         15        DO_ICALL                                                 
   13    16        TYPE_CHECK                                  1020          !1
         17      > JMPZ                                                     ~10, ->36
   14    18    >   INIT_USER_CALL                                1          'call_user_func', !1
         19        NEW                                              $11     'ErrorException'
         20        CHECK_FUNC_ARG                                           
         21        FETCH_DIM_FUNC_ARG                               $12     !0, 'message'
         22        SEND_FUNC_ARG                                            $12
         23        CHECK_FUNC_ARG                                           
         24        FETCH_DIM_FUNC_ARG                               $13     !0, 'type'
         25        SEND_FUNC_ARG                                            $13
         26        SEND_VAL_EX                                              0
         27        CHECK_FUNC_ARG                                           
         28        FETCH_DIM_FUNC_ARG                               $14     !0, 'file'
         29        SEND_FUNC_ARG                                            $14
         30        CHECK_FUNC_ARG                                           
         31        FETCH_DIM_FUNC_ARG                               $15     !0, 'line'
         32        SEND_FUNC_ARG                                            $15
         33        DO_FCALL                                      0          
         34        SEND_USER                                                $11
         35        DO_FCALL                                      0          
   16    36    > > EXIT                                                     
   18    37    > > RETURN                                                   null

End of function __fatalhandler

Function %00fakehandler%2Fin%2FJi5GF%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ji5GF
function name:  fakeHandler
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function %00fakehandler%2Fin%2FJi5GF%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.06 ms | 1400 KiB | 19 Q