What are the limitations of PHP's handling of static properties in OOP?

PHP's handling of static properties in OOP can be limited because static properties are shared across all instances of a class, which can lead to unexpected behavior if not managed carefully. One solution to this limitation is to use static methods to access and modify static properties in a controlled manner, ensuring that the data remains consistent across all instances.

class Example {
    private static $staticProperty = 0;

    public static function getStaticProperty() {
        return self::$staticProperty;
    }

    public static function setStaticProperty($value) {
        self::$staticProperty = $value;
    }
}

Example::setStaticProperty(10);
echo Example::getStaticProperty(); // Output: 10