3v4l.org

run code in 300+ PHP versions simultaneously
<?php function handler1() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; } function handler2() { echo "\n######### " . __FUNCTION__ . "() called #########\n"; } set_exception_handler('handler1'); set_exception_handler('handler2'); 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/jJnRr
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'handler1'
          2        DO_ICALL                                                 
   11     3        INIT_FCALL                                               'set_exception_handler'
          4        SEND_VAL                                                 'handler2'
          5        DO_ICALL                                                 
   13     6      > JMPZ                                                     <true>, ->12
   14     7    >   NEW                                              $2      'Exception'
          8        SEND_VAL_EX                                              'x'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $2
         11*       JMP                                                      ->15
   17    12    >   NEW                                              $4      'foo'
         13        DO_FCALL                                      0          
         14        FREE                                                     $4
   18    15      > RETURN                                                   1

Function handler1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jJnRr
function name:  handler1
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+handler1%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
    5     1      > RETURN                                                   null

End of function handler1

Function handler2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jJnRr
function name:  handler2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '%0A%23%23%23%23%23%23%23%23%23+handler2%28%29+called+%23%23%23%23%23%23%23%23%23%0A'
    8     1      > RETURN                                                   null

End of function handler2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.41 ms | 1396 KiB | 15 Q