3v4l.org

run code in 300+ PHP versions simultaneously
<?php $error_handler = function($severity, $message, $filename, $lineno) { echo "error handled \n"; throw new ErrorException($message, 0, $severity, $filename, $lineno); }; $exception_handler = function($exception) { echo "exception handled \n"; self::invokeHttpError(500); }; set_error_handler($error_handler, E_ALL | E_STRICT); set_exception_handler($exception_handler); ///////////////////////// throw new Exception($message, 0, $severity, $filename, $lineno);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/TAcnk
function name:  (null)
number of ops:  20
compiled vars:  !0 = $error_handler, !1 = $exception_handler, !2 = $message, !3 = $severity, !4 = $filename, !5 = $lineno
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTAcnk%3A2%240'
          1        ASSIGN                                                   !0, ~6
    7     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTAcnk%3A7%241'
          3        ASSIGN                                                   !1, ~8
   12     4        INIT_FCALL                                               'set_error_handler'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 32767
          7        DO_ICALL                                                 
   13     8        INIT_FCALL                                               'set_exception_handler'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   15    11        NEW                                              $12     'Exception'
         12        SEND_VAR_EX                                              !2
         13        SEND_VAL_EX                                              0
         14        SEND_VAR_EX                                              !3
         15        SEND_VAR_EX                                              !4
         16        SEND_VAR_EX                                              !5
         17        DO_FCALL                                      0          
         18      > THROW                                         0          $12
         19*     > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTAcnk%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/TAcnk
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $severity, !1 = $message, !2 = $filename, !3 = $lineno
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    3     4        ECHO                                                     'error+handled+%0A'
    4     5        NEW                                              $4      'ErrorException'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAL_EX                                              0
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
    5    13*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTAcnk%3A2%240

Function %00%7Bclosure%7D%2Fin%2FTAcnk%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAcnk
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ECHO                                                     'exception+handled+%0A'
    9     2        INIT_STATIC_METHOD_CALL                                  'invokeHttpError'
          3        SEND_VAL_EX                                              500
          4        DO_FCALL                                      0          
   10     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTAcnk%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.91 ms | 1392 KiB | 17 Q