3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct($a, $b, $c) { throw new Exception("test"); } } class B extends A { public function __construct($a, $b, $c) { var_dump($this); try { parent::__construct($a, $b, $c); } catch (Exception $e) { //var_dump($e); var_dump($this); } } public function test() { var_dump($this); } } $b = new B(1, 2, 3); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VXhDg
function name:  (null)
number of ops:  7
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'B'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        SEND_VAL_EX                                              3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   26     6      > RETURN                                                   1

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

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VXhDg
function name:  __construct
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   10     3        INIT_FCALL                                               'var_dump'
          4        FETCH_THIS                                       ~4      
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   13     7        INIT_STATIC_METHOD_CALL                                  
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->18
   14    13  E > > CATCH                                       last         'Exception'
   16    14    >   INIT_FCALL                                               'var_dump'
         15        FETCH_THIS                                       ~7      
         16        SEND_VAL                                                 ~7
         17        DO_ICALL                                                 
   18    18    > > RETURN                                                   null

End of function __construct

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VXhDg
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   22     4      > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.76 ms | 945 KiB | 16 Q