Re: [PHP-DEV] [VOTE] Readonly properties

This is only part of a thread. view whole thread
  115280
July 3, 2021 12:00 tovilo.ilija@gmail.com (Ilija Tovilo)
Hi

> Thanks for the RFC. A quick question, is it allowed to assign to a readonly property multiple times within the construction method? Sorry for it if someone has asked this before, because actually I didn't go through the whole thread, only did a quick search on it. Thanks.
No, assignment is exclusively allowed under two conditions: 1. The property is declared in the same class 2. The property is uninitialized This means you won't be able to change a property once you've written a value to it, even in the constructor. Ilija