Re: PHP 4.0 Bug #5270: Nested foreach() using a copy of the same array does not work properly.
| From: | Stanislav Malyshev | Date: | Thu, 29 Jun 2000 14:17:36 +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-22792@lists.php.net to get a copy of this message | ||
DB>> That makes sense, but are copies just references to the original? It seems
DB>> that this would not happen on a copy.. I mean.. it's a *copy* right? =)
Well, not really. PHP likes to copy-on-write. I suspect that foreach
doesn't do the right thing here (though I might be wrong on that).
--
Stanislav Malyshev stas@zend.com
+972-3-6139665