Hi Nikita,
On Thu, Jan 22, 2015 at 12:42 AM, Nikita Popov wrote:
> On Wed, Jan 21, 2015 at 2:57 PM, Dmitry Stogov wrote:
>
>> Hi,
>>
>> Yeah, I think changing foreach behaviour in more consistent and efficient
>> way may make sense.
>> If we won't use HashTable.nInternalPointer we won't need to
On Wed, Jan 21, 2015 at 2:57 PM, Dmitry Stogov wrote:
> Hi,
>
> Yeah, I think changing foreach behaviour in more consistent and efficient
> way may make sense.
> If we won't use HashTable.nInternalPointer we won't need to copy immutable
> arrays.
> The same for nested foreach on the same array.
>
Yasuo Ohgaki wrote on 21/01/2015 02:48:
I don't think that's an either/or situation: in most cases, it
would be up to the user to create that independent iterator,
because there's no general algorithm for cloning one that the
engine could use. (Think of an iterator proxying a dat
ough this is not really necessary unless
the array is actually changed during iteration
Cheers,
Ben
== Original ==
From: Dmitry Stogov
To: Yasuo Ohgaki , Nikita Popov
Date: Wed, 21 Jan 2015 14:57:59 +0100
Subject: Re: [PHP-DEV] Fixing strange foreach behavior.
Hi,
Yeah,
Hi,
Yeah, I think changing foreach behaviour in more consistent and efficient
way may make sense.
If we won't use HashTable.nInternalPointer we won't need to copy immutable
arrays.
The same for nested foreach on the same array.
We could also eliminate all the HashPosition magic introduced to keep
Hi Rowan,
On Mon, Jan 19, 2015 at 12:05 AM, Rowan Collins
wrote:
> On 18 January 2015 at 01:01, Yasuo Ohgaki wrote:
>
>> Hi Rowan,
>>
>> On Sat, Jan 17, 2015 at 8:43 PM, Rowan Collins
>> wrote:
>>
>>> My concern is, at what cost? Given how rarely used the internal pointer
>>> is,
>>> are we ca
On 18 January 2015 at 01:01, Yasuo Ohgaki wrote:
> Hi Rowan,
>
> On Sat, Jan 17, 2015 at 8:43 PM, Rowan Collins
> wrote:
>
>> My concern is, at what cost? Given how rarely used the internal pointer
>> is,
>> are we carrying around a chunk of extra memory with every array just on
>> the
>> off-ch
Hi Rowan,
On Sat, Jan 17, 2015 at 8:43 PM, Rowan Collins
wrote:
> My concern is, at what cost? Given how rarely used the internal pointer is,
> are we carrying around a chunk of extra memory with every array just on the
> off-chance that it will be used, or is there some magic that makes it
> ze
On 16 January 2015 at 21:15, Yasuo Ohgaki wrote:
> Hi Rowan,
>
> On Sat, Jan 17, 2015 at 1:22 AM, Rowan Collins
> wrote:
>
>> Yasuo Ohgaki wrote on 16/01/2015 08:40:
>>
>>> Hi all,
>>>
>>> Take a look at
>>>
>>> http://3v4l.org/HbVnd
>>>
>>> foreach should not affect internal(zval) array positio
Hi Rowan,
On Sat, Jan 17, 2015 at 1:22 AM, Rowan Collins
wrote:
> Yasuo Ohgaki wrote on 16/01/2015 08:40:
>
>> Hi all,
>>
>> Take a look at
>>
>> http://3v4l.org/HbVnd
>>
>> foreach should not affect internal(zval) array position, but it does.
>> I'm not sure why foreach works this way, but HHVM
Yasuo Ohgaki wrote on 16/01/2015 08:40:
Hi all,
Take a look at
http://3v4l.org/HbVnd
foreach should not affect internal(zval) array position, but it does.
I'm not sure why foreach works this way, but HHVM behavior is
reasonable. IMHO.
PHP 7 would be perfect opportunity fix this behavior.
Any
11 matches
Mail list logo