Cannot Static Static Property

<?php

class x {
    // the way to go is self
    static private self $property1;

    // tough luck not possible
    static private static $property2;

}
?>

Static can be used as a keyword to mark a property as static (sic). It could also be used as a type for that same property, leading to those confusing lines below.

In fact, static would accept self, but also parent and any children class: just like self. So, self is sufficient to type properties, and there is no need for static static.

See Also

PHP Error Messages

PHP Features

Last updated: 14 July 2026