3v4l.org

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

Class C:
Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIGup
function name:  Myfunction
number of ops:  3
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   CONCAT                                           ~1      'VAL%3A+', !0
          1        ECHO                                                     ~1
   16     2      > 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/uIGup
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 C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.87 ms | 1395 KiB | 13 Q