Re: [RFC] [DISCUSSION] Immutable/final/readonly properties
| From: | Marco Pivetta | Date: | Wed, 19 Feb 2020 17:52:02 +0000 |
| Subject: | Re: [RFC] [DISCUSSION] Immutable/final/readonly properties | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108681@lists.php.net to get a copy of this message | ||
Hey Mark,
Asking here as well, so that others are aware: is
unset($this->aPropertyThatWasNotInitializedBefore) still working with
this patch?
Also, are the semantics around __get, __set and __isset the
same as
with typed properties?
In the RFC, you have unset($foo->c) as disallowed: the property isn't
declared nor initialized though. I'd expect this to fail only after first
initialization?
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On Wed, Feb 19, 2020 at 6:06 PM Máté Kocsis <kocsismate90@gmail.com> wrote:
> Hi Internals,
>
> I'd like to move my RFC forward to the discussion phase:
> https://wiki.php.net/rfc/write_once_properties
>
> In short, I propose to add support for a new property modifier that would
> allow properties to be initialized, but not modified afterwards.
>
> Cheers,
> Máté Kocsis
>