Hi,
I've solved most of the reported problems and started working on RFC.
Nikta, please take a look into:
https://wiki.php.net/rfc/php7_foreach
https://github.com/php/php-src/pull/1034
and especially commit 15a23b1
Only iteration by value over plain objects is not completely consistent now.
Howe
I've created a branch and pull request for easier collaboration and
tracking.
https://github.com/php/php-src/pull/1034
It's the same diff I published yesterday. Nothing changed or added yet.
Thanks. Dmitry.
On Wed, Jan 28, 2015 at 1:36 AM, Nikita Popov wrote:
> On Tue, Jan 27, 2015 at 5:55 PM
al pointer all together, but we would just
>> >> use
>> >> it for the less common by-reference case as well as for the legacy
>> >> reset/next functions, of course. This would still improve most for-each
>> >> traversals. At least we then wouldn&
traversals. At least we then wouldn't have to find a replacement
> solution
> >> for rest/prev/next/end. Moreover we can then move the internal position
> >> pointer out of the hashtable structure into zend_array because it is
> only
> >> used for userla
into zend_array because it is only
>>> used for userland arrays, not other hash tables (such as object properties
>>> or internal structures that build upon the hashtable struct).
>>>
>>> Thanks,
>>>
>>> Ben
>>>
>>> ==
on
>> pointer out of the hashtable structure into zend_array because it is only
>> used for userland arrays, not other hash tables (such as object properties
>> or internal structures that build upon the hashtable struct).
>>
>> Thanks,
>>
>> Ben
&g
On Jan 28, 2015 2:36 AM, "Nikita Popov" wrote:
>
> On Tue, Jan 27, 2015 at 5:55 PM, Dmitry Stogov wrote:
>>
>> Hi,
>>
>> I'm working on a PoC, implementing the proposed behavior -
https://gist.github.com/dstogov/a311e8b0b2cabee4dab4
>>
>> Only few PHPT tests had to be changed to confirm new behav
On Tue, Jan 27, 2015 at 5:55 PM, Dmitry Stogov wrote:
> Hi,
>
> I'm working on a PoC, implementing the proposed behavior -
> https://gist.github.com/dstogov/a311e8b0b2cabee4dab4
>
> Only few PHPT tests had to be changed to confirm new behavior and actually
> they started to behave as HHVM.
> 2 te
Hi Dmitry,
On Wed, Jan 28, 2015 at 1:55 AM, Dmitry Stogov wrote:
> I'm working on a PoC, implementing the proposed behavior -
> https://gist.github.com/dstogov/a311e8b0b2cabee4dab4
>
> Only few PHPT tests had to be changed to confirm new behavior and actually
> they started to behave as HHVM.
>
On 01/27/2015 08:55 AM, Dmitry Stogov wrote:
> The patch makes ~1% improvement on Wordpress-3.6 (saving duplication and
> destruction of 200 arrays on each request)
Awesome!
signature.asc
Description: OpenPGP digital signature
is only
> used for userland arrays, not other hash tables (such as object properties
> or internal structures that build upon the hashtable struct).
>
> Thanks,
>
> Ben
>
> == Original ==
> From: Nikita Popov
> To: Benjamin Coutu
> Date: Thu, 22
P-DEV] Improvements to for-each implementation
Doing this was the idea I had in mind as well, i.e. change the semantics of
foreach to say that it will always work on a copy for by-value iteration
(which ironically avoids having to actually copy it). Note that this will
differ from the current behavior
On Thu, Jan 22, 2015 at 9:33 AM, Benjamin Coutu wrote:
> Hi,
>
> this post is a fork of the "[PHP-DEV] Fixing strange foreach behavior"
> thread. It proposes a more efficient for-each mechanism (that does NOT
> change the conceptual behaviour).
>
> Currently on for-each the engine will have to co
Hi,
this post is a fork of the "[PHP-DEV] Fixing strange foreach behavior" thread.
It proposes a more efficient for-each mechanism (that does NOT change the
conceptual behaviour).
Currently on for-each the engine will have to copy the array if that array is
visible anywhere else in the program
14 matches
Mail list logo