RE: [PEAR-DEV] [PATCH] small speedup in DB::ifx::fetchInto()
| From: | Lukas Smith | Date: | Fri, 06 Jun 2003 20:03:38 +0000 |
| Subject: | RE: [PEAR-DEV] [PATCH] small speedup in DB::ifx::fetchInto() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17131@lists.php.net to get a copy of this message | ||
> From: 'Roman Neuhauser' [mailto:neuhauser@bellavista.cz]
> Sent: Friday, June 06, 2003 9:59 PM
>
> # 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?
I see I am making a fool of myself again :-)
Anyways I didn't look at your patch *again* ... I was just making a
general comment that some things that were done the way they were done
might be related to the fact that when they were implemented the
functions that would be used today did not exist. However then it might
make sense to evaluate if increasing the dependencies makes sense or
not.
That is all :-)
Keep up the good work.
Regards,
Lukas