,
Share with your friends 

accessing a class method in php

4 ratings Views 171 
Author: Akshay_fa6112ad (Akshay Dhankhar)  View Profile |  View other solutions by this author

Question / Problem


What’s the difference between accessing a class method via -> and via ::?

Solution

:: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.

Applies to

PHP

Rank It

Login to rank it

Report


Advertisement