Blog

Brief PHP Scope Resolution Operator Explanation
Posted on June 23, 2015 in OOP, PHP by Matt Jennings

In the example below the scope resolution operator (::) ensures the attack() method of the Wizard subclass includes the code inside the attack() method of the Human parent class which has the same name but is NOT overwritten.

Tags:

Leave a Reply

To Top ↑