Re: [PATCH] small speedup in DB::ifx::fetchInto()

From: Date: Fri, 06 Jun 2003 19:58:32 +0000
Subject: Re: [PATCH] small speedup in DB::ifx::fetchInto()
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17130@lists.php.net to get a copy of this message
# smith@backendmedia.com / 2003-06-06 21:53:14 +0200: > > From: Roman Neuhauser [mailto:neuhauser@bellavista.cz] > > > > since array_values() is much faster than transforming an associative > > array into an ordered one with foreach(), and preserves the key order, > > there's no reason not to use it. > > I dont know the specifics here, but just as a general tipp please check > the version of the ifx ext since when this function exists to ensure > that the proper dependencies are set in the package.xml file. I don't understand. This is the patch again: if ($fetchmode !== DB_FETCHMODE_ASSOC) { - $i=0; - $order = array(); - foreach ($row as $key => $val) { - $order[$i++] = $val; - } - $row = $order; + $row = array_values($row); } Can you explain how is it related to the ifx extension version, and under what circumstances is array_values() not available in PHP? Or is PHP 3 supported by PEAR? -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html

« previous php.pear.dev (#17130) next »