Update page 'P# v1.0 Specification'
@@ -708,7 +708,7 @@ Multiple inheritance can lead to ambiguity. One of the example of such problem i
|
|||||||
class Derived extends Base1, Base2 {
|
class Derived extends Base1, Base2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
In above situation, class Derived inherits method funcA() from Base1 class, and method funcB() from Base2 class. However, only class Base1 is registered as direct base class. This means that only methods from class Base1 can be accessed by using __parent__ operator. Because both method names are different, in this specific case both of them are accessible by using $this operator.
|
In above situation, class Derived inherits method funcA() from Base1 class, and method funcB() from Base2 class. However, only class Base1 is registered as direct base class. This means that only methods from class Base1 can be accessed by using __parent__ operator. Because both method names are different, in this specific case both of them are accessible by using __$this__ operator.
|
||||||
|
|
||||||
class Base1 {
|
class Base1 {
|
||||||
void funcA() {
|
void funcA() {
|
||||||
|
|||||||
Reference in New Issue
Block a user