3v4l.org

run code in 500+ PHP versions simultaneously
<?php class parentt { public $property1; public function __construct() { $this->property1 = 1; } } class child extends parentt { public $property2; public function __construct() { $this->property2 = $this->property1; } public function showProperty(){ return $this->property2; } } $obj = new child(); echo $obj->showProperty();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wf8Gi
function name:  (null)
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   30     0  E >   NEW                                                  $1      'child'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   31     3        INIT_METHOD_CALL                                             !0, 'showProperty'
          4        DO_FCALL                                          0  $4      
          5        ECHO                                                         $4
          6      > RETURN                                                       1

Class parentt:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wf8Gi
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                                   'property1'
          1        OP_DATA                                                      1
   10     2      > RETURN                                                       null

End of function __construct

End of class parentt.

Class child:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wf8Gi
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                          ~1      'property1'
          1        ASSIGN_OBJ                                                   'property2'
          2        OP_DATA                                                      ~1
   20     3      > RETURN                                                       null

End of function __construct

Function showproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wf8Gi
function name:  showProperty
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   24     0  E >   FETCH_OBJ_R                                          ~0      'property2'
          1      > RETURN                                                       ~0
   26     2*     > RETURN                                                       null

End of function showproperty

End of class child.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.9 ms | 2532 KiB | 13 Q