adspace
What's the difference between accessing a class method via -> and via ::?
Answer Posted / Barkha Rai
In PHP, the `->` operator is used for calling methods on an instance of a class. For example: `$obj->method()`. On the other hand, the `::` operator is used for static methods and function-like properties. It's called as `ClassName::methodName()`, without any object instance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the current stable version of php?
What is the difference between htmlentities() and htmlspecialchars()?
Explain me is it possible to destroy a cookie?
how to detect a mobile device using php
List some features of php that are deprecated in php7?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?
What sized websites have you worked on in the past?
Write a program using while loop?
Name and explain five of the PHP error constants?
Tell me what kind of things have you done on the social side?
What does $_files means?
Which variable declarations within a class is invalid in php?
What is difference between static and final in php?
How to create a web form?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer