On 09.10.2024 19:08, Kamil Tekiela <tekiela...@gmail.com> wrote: > > I have to admit I understood nothing from your email, but I got > curious about some of your words.
Hi, Kamil! I tried my best :) Thank you for your interest! > > A readonly property is two functionalities in one: write-once and > private set. > > What do you mean it is private set? Readonly only means the property > is writable once. It does not affect its visibility. It in fact does affect visibility. For instance, you cannot write uninitialized public property from global scope: https://3v4l.org/4Xf2R The same fact is mentioned in the aviz RFC: https://wiki.php.net/rfc/asymmetric-visibility-v2#:~:text=The%20readonly%20flag%2C%20introduced%20in%20PHP%208.1%2C%20is%20really%20two%20flags%20in%20one -- Valentin