What is the difference between accessing a class method via -> and via ::?
Answer Posted / Garima Agrawal
In PHP, you can access class methods using -> (arrow operator) for instances of that class or using :: (scope resolution operator) to call static methods. The arrow operator requires an instance, while the scope resolution operator doesn't.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers