I do know about get_object_vars, but for me foreach ($object as $prop)
{} looks nicer and a little bit faster (probably because there are no
function calls). Also it's more flexible because in future you can
implement an Iterator on class and alter iteration behavior.
But after reading through http
On Thursday, 14 November 2024 at 17:24, Larry Garfield
wrote:
> On Thu, Nov 14, 2024, at 7:37 AM, Christian Schneider wrote:
>
> > Am 14.11.2024 um 10:59 schrieb Marco Pivetta ocram...@gmail.com:
> >
> > > On Thu, 14 Nov 2024, 11:29 MrMeshok, ilyaorlov...@gmail.com wrote:
> > >
> > > > Hello,
On Thu, Nov 14, 2024, at 7:37 AM, Christian Schneider wrote:
> Am 14.11.2024 um 10:59 schrieb Marco Pivetta :
>> On Thu, 14 Nov 2024, 11:29 MrMeshok, wrote:
>>> Hello, Internals!
>>>
>>> As you know if you try to unpack a regular object (`...$object`) you will
>>> get an error: Only arrays and T
Am 14.11.2024 um 10:59 schrieb Marco Pivetta :
> On Thu, 14 Nov 2024, 11:29 MrMeshok, wrote:
>> Hello, Internals!
>>
>> As you know if you try to unpack a regular object (`...$object`) you will
>> get an error: Only arrays and Traversables can be unpacked.
>> I don't really see a reason for this
On Thu, 14 Nov 2024, 11:29 MrMeshok, wrote:
> Hello, Internals!
>
> As you know if you try to unpack a regular object (`...$object`) you will
> get an error: Only arrays and Traversables can be unpacked.
> I don't really see a reason for this restriction, because foreach on
> objects works perfec
Hello, Internals!
As you know if you try to unpack a regular object (`...$object`) you will
get an error: Only arrays and Traversables can be unpacked.
I don't really see a reason for this restriction, because foreach on
objects works perfectly fine, so I made a feature request on GitHub to
change