Which is the correct way to call an object method?
-
$object.method()
-
$object->$method()
-
$object:$method()
-
$object->method()
D
Correct answer
Explanation
In PHP, object methods are called using the arrow operator (->), which is the standard syntax for accessing properties and methods of an object. This is distinct from languages like JavaScript or Java that use dot notation.