3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); header('Content-type: text/plain; charset=utf-8'); function a($a) { throw new Exception2('EXCEPTION MESSAGE'); } function b($b) { a($b); } try { b('THIS PARAMETER SHOULD SHOW UP'); } catch(Exception $e) { var_dump($e); } class Exception2 extends Exception { public function __construct() { $args = func_get_args(); call_user_func_array(array($this, 'parent::__construct'), $args); var_dump(debug_backtrace()); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QcHCP
function name:  (null)
number of ops:  15
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'header'
          4        SEND_VAL                                                 'Content-type%3A+text%2Fplain%3B+charset%3Dutf-8'
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'b'
          7        SEND_VAL                                                 'THIS+PARAMETER+SHOULD+SHOW+UP'
          8        DO_FCALL                                      0          
          9      > JMP                                                      ->14
   16    10  E > > CATCH                                       last         'Exception'
   17    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   30    14    > > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/QcHCP
function name:  a
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        NEW                                              $1      'Exception2'
          2        SEND_VAL_EX                                              'EXCEPTION+MESSAGE'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    8     5*     > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QcHCP
function name:  b
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'a'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   12     4      > RETURN                                                   null

End of function b

Class Exception2:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QcHCP
function name:  __construct
number of ops:  15
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   FUNC_GET_ARGS                                    ~1      
          1        ASSIGN                                                   !0, ~1
   26     2        FETCH_THIS                                       ~3      
          3        INIT_ARRAY                                       ~4      ~3
          4        ADD_ARRAY_ELEMENT                                ~4      'parent%3A%3A__construct'
          5        INIT_USER_CALL                                0          'call_user_func_array', ~4
          6        SEND_ARRAY                                               !0
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0          
   28     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'debug_backtrace'
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
   29    14      > RETURN                                                   null

End of function __construct

End of class Exception2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.68 ms | 1402 KiB | 23 Q