Skip to content

Document that readonly properties cannot be initialized by reference#5226

Open
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/issue-3250-readonly-reference-init
Open

Document that readonly properties cannot be initialized by reference#5226
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/issue-3250-readonly-reference-init

Conversation

@lacatoire
Copy link
Contributor

Clarify that readonly properties must be initialized through direct assignment and cannot be initialized via by-reference parameters.

Fixes #3250

Clarify that readonly properties must be initialized through direct
assignment and cannot be initialized via by-reference parameters.

Fixes php#3250
@lacatoire lacatoire force-pushed the fix/issue-3250-readonly-reference-init branch from f4149c2 to 68a6d0e Compare January 30, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initialisation of readonly properties by reference does not work (e.g. matches of preg_match)

1 participant