What potential issues can arise when calling a public method as static in PHP?

When calling a public method as static in PHP, you may encounter issues with accessing non-static properties or methods within the method. To solve this issue, you can either make the method static and access only static properties and methods within it, or create an instance of the class and call the method on the instance.

class MyClass {
    public $property = 'Hello';

    public static function myStaticMethod() {
        // Accessing non-static property will cause an issue
        // To solve this, either make the property static or create an instance of the class
        $instance = new self();
        echo $instance->property;
    }
}

MyClass::myStaticMethod();