3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function __construct($arg){ $this->test($arg); } function test($args) { throw new Exception; } } try { new Test('Yar'); } catch(Exception $e) { print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT)); var_dump($e->getTrace()); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYdbp
function name:  (null)
number of ops:  18
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Test'
          1        SEND_VAL_EX                                              'Yar'
          2        DO_FCALL                                      0          
          3        FREE                                                     $1
          4      > JMP                                                      ->17
   13     5  E > > CATCH                                       last         'Exception'
   14     6    >   INIT_FCALL                                               'print_r'
          7        INIT_FCALL                                               'debug_backtrace'
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
   15    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !0, 'getTrace'
         14        DO_FCALL                                      0  $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
   17    17    > > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYdbp
function name:  __construct
number of ops:  5
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_METHOD_CALL                                         'test'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    5     4      > RETURN                                                   null

End of function __construct

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

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.19 ms | 1388 KiB | 19 Q