3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler('myErrorHandler'); register_shutdown_function(function(){ if (strpos($errstr, 'Class')) { var_dump('foo'); return true; } return false; }); function fatalErrorShutdownHandler() { $last_error = error_get_last(); if ($last_error['type'] === E_ERROR) { // fatal error myErrorHandler(E_ERROR, $last_error['message'], $last_error['file'], $last_error['line']); } } Everything::is('awesome'); echo Everything;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oGTQp
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'myErrorHandler'
          2        DO_ICALL                                                 
    8     3        INIT_FCALL                                               'register_shutdown_function'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FoGTQp%3A8%240'
   15     5        SEND_VAL                                                 ~1
          6        DO_ICALL                                                 
   30     7        INIT_STATIC_METHOD_CALL                                  'Everything', 'is'
          8        SEND_VAL_EX                                              'awesome'
          9        DO_FCALL                                      0          
   32    10        FETCH_CONSTANT                                   ~4      'Everything'
         11        ECHO                                                     ~4
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FoGTQp%3A8%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oGTQp
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'strpos'
          1        SEND_VAR                                                 !0
          2        SEND_VAL                                                 'Class'
          3        DO_ICALL                                         $1      
          4      > JMPZ                                                     $1, ->9
   11     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAL                                                 'foo'
          7        DO_ICALL                                                 
   12     8      > RETURN                                                   <true>
   14     9    > > RETURN                                                   <false>
   15    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FoGTQp%3A8%240

Function fatalerrorshutdownhandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/oGTQp
function name:  fatalErrorShutdownHandler
number of ops:  19
compiled vars:  !0 = $last_error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   20     3        FETCH_DIM_R                                      ~3      !0, 'type'
          4        IS_IDENTICAL                                             ~3, 1
          5      > JMPZ                                                     ~4, ->18
   22     6    >   INIT_FCALL_BY_NAME                                       'myErrorHandler'
          7        SEND_VAL_EX                                              1
          8        CHECK_FUNC_ARG                                           
          9        FETCH_DIM_FUNC_ARG                               $5      !0, 'message'
         10        SEND_FUNC_ARG                                            $5
         11        CHECK_FUNC_ARG                                           
         12        FETCH_DIM_FUNC_ARG                               $6      !0, 'file'
         13        SEND_FUNC_ARG                                            $6
         14        CHECK_FUNC_ARG                                           
         15        FETCH_DIM_FUNC_ARG                               $7      !0, 'line'
         16        SEND_FUNC_ARG                                            $7
         17        DO_FCALL                                      0          
   24    18    > > RETURN                                                   null

End of function fatalerrorshutdownhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.94 ms | 1400 KiB | 23 Q