RE: [PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-22 Thread Ford, Mike
-Original Message- From: Jonathan Sachs [mailto:081...@jhsachs.com] Sent: 20 October 2010 04:48 To: php-general@lists.php.net Subject: [PHP] Possible foreach bug; seeking advice to isolate the problem I've got a script which originally contained the following piece of code

Re: [PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread richard gray
On 20/10/2010 05:47, Jonathan Sachs wrote: I've got a script which originally contained the following piece of code: foreach ( $objs as $obj ) { do_some_stuff($obj); } When I tested it, I found that on every iteration of the loop the last element of $objs was assigned the value of the

[PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-19 Thread Jonathan Sachs
I've got a script which originally contained the following piece of code: foreach ( $objs as $obj ) { do_some_stuff($obj); } When I tested it, I found that on every iteration of the loop the last element of $objs was assigned the value of the current element. I was able to step through the