3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testcore { public $var; function __construct($id = null) { // does things } } class A extends Testcore { public $var = array( 'name' => 'hello', 'int' => 5 ); function __construct($id = null) { parent::__construct($id); $test = new B(); $test = null; var_dump($this->var); } } class B extends Testcore { public $var = array( 'name' => 'goodbye', 'int' => 8 ); function __construct($id = null) { parent::__construct($id); } } $do = new A(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PjrqP
function name:  (null)
number of ops:  4
compiled vars:  !0 = $do
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   43     3      > RETURN                                                   1

Class Testcore:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PjrqP
function name:  __construct
number of ops:  2
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      null
    9     1      > RETURN                                                   null

End of function __construct

End of class Testcore.

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PjrqP
function name:  __construct
number of ops:  13
compiled vars:  !0 = $id, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      null
   20     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   22     4        NEW                                              $3      'B'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $3
   23     7        ASSIGN                                                   !1, null
   25     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~7      'var'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
   26    12      > 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 = 62) Position 1 = -2
filename:       /in/PjrqP
function name:  __construct
number of ops:  5
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   RECV_INIT                                        !0      null
   37     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   38     4      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.87 ms | 1396 KiB | 15 Q