3v4l.org

run code in 300+ PHP versions simultaneously
<?php exit(1); /*E_ERROR E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING*/ function exception_error_handler($errno, $errstr, $errfile, $errline) { var_dump($errstr); } set_error_handler("exception_error_handler", error_reporting()); function shutDownFunction() { $error = error_get_last(); if ($error['type'] == 1) { //do your stuff } } register_shutdown_function('shutdownFunction'); echo "\n"; echo "Hello World"; echo "\n\n"; var_dump(error_get_last()); declare(foo='bar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/70fgq
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > EXIT                                                     1
   12     1*       INIT_FCALL                                               'set_error_handler'
          2*       SEND_VAL                                                 'exception_error_handler'
          3*       INIT_FCALL                                               'error_reporting'
          4*       DO_ICALL                                         $0      
          5*       SEND_VAR                                                 $0
          6*       DO_ICALL                                                 
   20     7*       INIT_FCALL                                               'register_shutdown_function'
          8*       SEND_VAL                                                 'shutdownFunction'
          9*       DO_ICALL                                                 
   23    10*       ECHO                                                     '%0A'
   24    11*       ECHO                                                     'Hello+World'
   25    12*       ECHO                                                     '%0A%0A'
   26    13*       INIT_FCALL                                               'var_dump'
         14*       INIT_FCALL                                               'error_get_last'
         15*       DO_ICALL                                         $3      
         16*       SEND_VAR                                                 $3
         17*       DO_ICALL                                                 
   27    18*     > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/70fgq
function name:  exception_error_handler
number of ops:  8
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   10     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   11     7      > RETURN                                                   null

End of function exception_error_handler

Function shutdownfunction:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/70fgq
function name:  shutDownFunction
number of ops:  7
compiled vars:  !0 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   16     3        FETCH_DIM_R                                      ~3      !0, 'type'
          4        IS_EQUAL                                                 ~3, 1
          5      > JMPZ                                                     ~4, ->6
   19     6    > > RETURN                                                   null

End of function shutdownfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.48 ms | 1400 KiB | 23 Q