RE: [PHP] foreach loop changed after 4.3 -> 4.4 upgrade

From: Date: Wed, 24 Aug 2005 00:34:09 +0000
Subject: RE: [PHP] foreach loop changed after 4.3 -> 4.4 upgrade
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221220@lists.php.net to get a copy of this message
On Tue, 2005-08-23 at 05:30, Ford, Mike wrote: > -----Original Message----- > From: Larry Brown > To: php > Sent: 23/08/05 02:28 > Subject: [PHP] foreach loop changed after 4.3 -> 4.4 upgrade > > I had a foreach loop working on an array as such: > > $multiarray = > array(array('person','person'),array('another','another')) > > the array was put through > > foreach($multiarray as $subArray){ > > do something with array > > } > > on each loop I would see $subArray= array([0] = 'person',[1] = 'person') > and then $subArray= array([0] = 'another',[1] = 'another') > > In other cases person might have some other value in the [1] position. > (it is being used in a function to create a select statement). > > After the upgrade from 4.3 to 4.4 though each iteration gives... > > array([0] = array([0] = 'person', [1] = 'person'),[1] = 0) and > array([0] = array([0] = 'another', [1] = 'another'),[1] = 1) > > ---------------------------- > > You have an out-of-date code optimizer insatalled -- install the latest > version of whichever one you are using. This is a known incompatibility -- > a quick search in the bugs database would have found multiple entries about > it (see, for instance, http://bugs.php.net/bug.php?id=30914, > http://bugs.php.net/bug.php?id=31194, and at least a couple of > dozen > others). > > Cheers! > > Mike > > > To view the terms under which this email is distributed, please go to > http://disclaimer.leedsmet.ac.uk/email.htm

« previous php.general (#221220) next »