Explain me what is the difference between accessing a class method via -> and via ::?
Answer Posted / Uttam Kumar Singh
Accessing a class method using the arrow operator (->) refers to calling it on an instance of that class, while using the scope resolution operator (::) calls the static method directly without creating an instance.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers