Hi Stas,
Stanislav Malyshev wrote:
How common is this problem? It looks like an edge case of an edge case
(converting objects to arrays as such is not a very frequent operation,
and the reverse is even less frequent) but adds performance hit on the
common case.
The confusion of string key Hash
Hi!
> To try and fix a longstanding issue, and to actually bring some
> attention to the fix, I've created a new RFC, which can be found here:
>
> https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts
How common is this problem? It looks like an edge case of an edge case
(convertin
Hi Yasuo,
Yasuo Ohgaki wrote:
Nice RFC!
It seems patch is made to convert int index to string index to allow
numeric key, is it?
Or vice-versa, yes.
I guess it is the limitation and the reason why
it's inaccessible.
Yes. If you have an object whose HashTable has an integer key, say 123,
This has been the case since 4.3 at the least: https://3v4l.org/bjZ4d
On Sat, Oct 22, 2016 at 22:48 Yasuo Ohgaki wrote:
> On Sun, Oct 23, 2016 at 4:59 AM, Yasuo Ohgaki wrote:
> > Numeric key name must be string?
> >
> > $obj->{'0'} = 1;
> >
> > or could be like (Without quotes)
> >
> > $obj->{0}
On Sun, Oct 23, 2016 at 4:59 AM, Yasuo Ohgaki wrote:
> Numeric key name must be string?
>
> $obj->{'0'} = 1;
>
> or could be like (Without quotes)
>
> $obj->{0} = 1;
It seems variables can be numeric now.
https://3v4l.org/bjZ4d
Regards,
--
Yasuo Ohgaki
yohg...@ohgaki.net
--
PHP Internals - P
Hi Andrea,
On Sat, Oct 22, 2016 at 8:11 AM, Andrea Faulds wrote:
> To try and fix a longstanding issue, and to actually bring some attention to
> the fix, I've created a new RFC, which can be found here:
>
> https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts
>
> It targets PHP 7.
Hi everyone,
To try and fix a longstanding issue, and to actually bring some
attention to the fix, I've created a new RFC, which can be found here:
https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts
It targets PHP 7.2, which is maybe a little conservative. It could
target PH