What's the difference between accessing a class method via -> and via ::?
Answer / 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 |
difference of move(), and copy() function in php?
Explain me what is the use of header() function in php?
What is $_ get in php?
How to call a php function from another php file?
What is php in simple words?
what is the maximum size of databasi in mysql?
What is php programming used for?
Is php object oriented?
What is the use of magic function in php?
Write a program using while loop in php?
How to Define a Constant in PHP? Is $ symbol necessary?
What are the advantages of php mysql?