kphp icon indicating copy to clipboard operation
kphp copied to clipboard

added `readonly` modifier support for properties

Open i582 opened this issue 5 years ago • 0 comments

RFC: https://wiki.php.net/rfc/readonly_properties_v2

The readonly modifier makes a property of a class read-only, which means that it cannot be changed outside the constructor of the class in which it is defined.

We already have a special @kphp-const attribute that can also make the class property read-only, so readonly duplicates this logic, but as part of PHP.

#290

i582 avatar Sep 10 '21 16:09 i582