Re: A little syntactic sugar on array_* function calls?
| From: | Mike Schinkel | Date: | Wed, 26 May 2021 11:03:41 +0000 |
| Subject: | Re: A little syntactic sugar on array_* function calls? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114613@lists.php.net to get a copy of this message | ||
> On May 25, 2021, at 6:28 PM, Iván Arias <txigreman@hotmail.com> wrote:
>
> Hi all,
>
> It sounds like scalar objects by Nikita:
> https://github.com/nikic/scalar_objects
Yes, but Nikita wrote this note about technical limitations at the bottom of the repo README:
Due to technical limitations, it is not possible to create mutable APIs for primitive types.
Modifying $self within the methods is not possible (or rather, will have no effect, as you'd
just be changing a copy).
Does that mean that the scope of Nikita's proof-of-concept could not modify $self, or that it
is simply not possible to modify $self given limitations inherent in PHP?
Further, does that only apply to scalars, or might possible arrays could be different?
-Mike