Re: PHP 4.0 Bug #5270: Nested foreach() using a copy of the same array does not work properly.

From: Date: Thu, 29 Jun 2000 14:11:50 +0000
Subject: Re: PHP 4.0 Bug #5270: Nested foreach() using a copy of the same array does not work properly.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-22788@lists.php.net to get a copy of this message
That makes sense, but are copies just references to the original? It seems that this would not happen on a copy.. I mean.. it's a *copy* right? =) Daniel At 04:35 PM 06/29/2000 +0300, you wrote:
AZ>> Actually, recently there was some internal API functionality added that AZ>> allows and array traversal command to not touch the internal array AZ>> pointer. It would be possible to go through the code base and convert it AZ>> to new functionality, but the question is whether that would be backward AZ>> compatible. I fear that won't help. The problem here is not that it moves the pointer, the problem seems to be that both foreach's actually work on the same array (because you do not modify it, so it tries to be "smart" and makes second array copy of the first). -- Stanislav Malyshev stas@zend.com +972-3-6139665 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#22788) next »