3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $test; function __construct() { $test = 999; } } class B extends A { protected $test2; function __construct() { $test2 = 99999; } } class C extends B { function Myfunction() { echo 'VAL: ' . $test; echo 'VAL2: ' . $test2; } } $obj = new C; $obj->Myfunction(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CIkd4
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'Myfunction'
          4        DO_FCALL                                      0          
   27     5      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CIkd4
function name:  __construct
number of ops:  2
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 999
    6     1      > 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/CIkd4
function name:  __construct
number of ops:  2
compiled vars:  !0 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 99999
   13     1      > RETURN                                                   null

End of function __construct

End of class B.

Class C:
Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CIkd4
function name:  Myfunction
number of ops:  5
compiled vars:  !0 = $test, !1 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   CONCAT                                           ~2      'VAL%3A+', !0
          1        ECHO                                                     ~2
   19     2        CONCAT                                           ~3      'VAL2%3A+', !1
          3        ECHO                                                     ~3
   20     4      > RETURN                                                   null

End of function myfunction

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CIkd4
function name:  __construct
number of ops:  2
compiled vars:  !0 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 99999
   13     1      > RETURN                                                   null

End of function __construct

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.45 ms | 1395 KiB | 13 Q