Re: Property hooks, and &get-only write behavior
| From: | Gina P. Banyard | Date: | Thu, 13 Jun 2024 01:24:05 +0000 |
| Subject: | Re: Property hooks, and &get-only write behavior | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123590@lists.php.net to get a copy of this message | ||
On Wednesday, 12 June 2024 at 16:06, Ilija Tovilo <tovilo.ilija@gmail.com> wrote:
> Hi everyone
>
> [...]
>
> I hope that these semantics are acceptable for everyone.
>
> Ilija
Hello Ilija,
I might know what sort of technical issues you've been running into, as I have some similar
issues correctly handling references with my Container/Offset RFC implementation.
The way I'm handling this is by splitting the "get"/read handler/hook to *just* be a
by-value return, and for fetching creating a new "fetch" handler that is called in the
respective situations.
Therefore, I am wondering if it wouldn't possibly make more sense to add a "fetch"
hook, and ban returning by-ref for the get hook.
Best regards,
Gina P. Banyard