How can the "->" operator in PHP classes be correctly utilized?

In PHP classes, the "->" operator is used to access properties and methods of an object. To correctly utilize this operator, you need to create an instance of the class and then use "->" followed by the property or method name to access or call it. Example:

class MyClass {
    public $myProperty = 'Hello';

    public function myMethod() {
        return 'World';
    }
}

$obj = new MyClass();
echo $obj->myProperty; // Output: Hello
echo $obj->myMethod(); // Output: World