3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Concrete5_Problems_Handler { private static $handled = false; public static function handleException($e) { if(self::$handled) { return; } self::$handled = true; echo "\n######### " . __FUNCTION__ . "() called #########\n"; } public static function handleShutdown() { if(self::$handled) { return; } self::$handled = true; echo "\n######### " . __FUNCTION__ . "() called #########\n"; } } set_exception_handler('Concrete5_Problems_Handler::handleException'); register_shutdown_function('Concrete5_Problems_Handler::handleShutdown'); if(!true) { throw new Exception('x'); } else { new foo(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sIIkm
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'Concrete5_Problems_Handler%3A%3AhandleException'
          2        DO_ICALL                                                 
   22     3        INIT_FCALL                                               'register_shutdown_function'
          4        SEND_VAL                                                 'Concrete5_Problems_Handler%3A%3AhandleShutdown'
          5        DO_ICALL                                                 
   24     6      > JMPZ                                                     <false>, ->12
   25     7    >   NEW                                              $2      'Exception'
          8        SEND_VAL_EX                                              'x'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $2
         11*       JMP                                                      ->15
   28    12    >   NEW                                              $4      'foo'
         13        DO_FCALL                                      0          
         14        FREE                                                     $4
   29    15      > RETURN                                                   1

Class Concrete5_Problems_Handler:
Function handleexception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sIIkm
function name:  handleException
number of ops:  8
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_STATIC_PROP_R          unknown             ~1      'handled'
          2      > JMPZ                                                     ~1, ->4
    7     3    > > RETURN                                                   null
    9     4    >   ASSIGN_STATIC_PROP                                       'handled'
          5        OP_DATA                                                  <true>
   10     6        ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+handleException%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
   11     7      > RETURN                                                   null

End of function handleexception

Function handleshutdown:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sIIkm
function name:  handleShutdown
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'handled'
          1      > JMPZ                                                     ~0, ->3
   14     2    > > RETURN                                                   null
   16     3    >   ASSIGN_STATIC_PROP                                       'handled'
          4        OP_DATA                                                  <true>
   17     5        ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+handleShutdown%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
   18     6      > RETURN                                                   null

End of function handleshutdown

End of class Concrete5_Problems_Handler.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.22 ms | 1400 KiB | 17 Q