Skip to content

added readonly modifier support for properties#307

Open
i582 wants to merge 3 commits intomasterfrom
pmakhnev/readonly_modifier
Open

added readonly modifier support for properties#307
i582 wants to merge 3 commits intomasterfrom
pmakhnev/readonly_modifier

Conversation

@i582
Copy link
Contributor

@i582 i582 commented Sep 10, 2021

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 i582 added the PHP8 PHP8 feature label Sep 10, 2021
@Tsygankov-Slava Tsygankov-Slava mentioned this pull request Jul 3, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP8 PHP8 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant