WordPress Support Officer Question:
Download Questions PDF

Please explain the difference between accessing a class method via -> and via ::

Answer:

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

Download WordPress Support Officer Interview Questions And Answers PDF

Previous QuestionNext Question
How to come code:
<?php print "Contents: $arr[1]"; ?>
works, but
<?php print "Contents: $arr[1][2]"; ?>
doesn't for two-dimensional array of mine?
How to call constructor for parent class?