|
class: protected methods |
You can call protected class directly from another class |
In the example below the class Club's method could call a protected member in a derived class; ( you won't be able to do it with private class). As a common feature of private and protected, you can't call directly any method with the instance/object created from the class. |
|
|
|
| if you try to call a protected class |
$user = new Club; |
|
|
|
|