What are some best practices for defining methods in classes that need to be called from outside the class in PHP?

When defining methods in classes that need to be called from outside the class in PHP, it is best practice to use access modifiers such as public or protected to control the visibility of the method. This ensures that the method can be accessed by external code while still maintaining encapsulation. Additionally, it is important to provide clear and descriptive method names to improve code readability and maintainability.

class MyClass {
    public function myPublicMethod() {
        // code here
    }

    protected function myProtectedMethod() {
        // code here
    }
}