Re: [RFC] isReadable/isWriteable property reflection
| From: | Larry Garfield | Date: | Wed, 17 Dec 2025 19:48:15 +0000 |
| Subject: | Re: [RFC] isReadable/isWriteable property reflection | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129642@lists.php.net to get a copy of this message | ||
On Wed, Dec 17, 2025, at 12:02 PM, Tim Düsterhus wrote:
> Hi
>
> Am 2025-12-17 16:26, schrieb Larry Garfield:
>> * We have decided on an approach for magic methods. The updated RFC
>> text explains it in more detail, but in short, "if __isset(), then use
>> that to determine readable. Otherwise, __get() implies readable.
>> __set() implies writeable." That should handle the use cases Nicolas
>> was interested in.
>
> That works for me. I didn't feel particularly strongly either way.
>
>> We consider the RFC feature complete at this point. Baring any further
>> substantive discussion, expect a vote in January after the blackout
>> period ends.
>
> I don't have further comments about the semantics themselves, but have
> one further clarification question:
>
>> The property has not been unset(). If it has, follow the same __isset
>> check as above
>
> Should this read “the same __get check” instead?
Hm, yes, you are correct. Updated.
> And one note with regard to process: Don't forget to add a link to the
> discussion (https://news-web.php.net/php.internals/129101) to the RFC.
Added.
Oh, and one other note: It turns out that in English, both "writeable" and
"writable" are nominally valid. The latter seems more common (and my spellchecker only
recognizing the latter), so we've standardized on the non-E version throughout the RFC. (The
code already was.)
--Larry Garfield