WordPress Question: Download WordPress (CMS) PDF

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

Tweet Share WhatsApp

Answer:

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

Download WordPress (CMS) PDF Read All 32 WordPress (CMS) Questions
Previous QuestionNext Question
Tell me Are objects passed by value or by reference?Suppose If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?