Re: Re: [PEPr] +1 for PHP::PHP_Compat
| From: | Aidan Lister | Date: | Wed, 12 May 2004 09:27:29 +0000 |
| Subject: | Re: Re: [PEPr] +1 for PHP::PHP_Compat | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29139@lists.php.net to get a copy of this message | ||
Thanks Stefan, I've fixed locally
"Stefan Ohrmann" <bshell@gmx.net> wrote in message
news:40A14499.3060601@gmx.net...
> Hello,
>
> I found this in your source code (array_combine):
>
> for ($i = 0; $i < count($values); $i++) {
> $rv[$keys[$i]] = $values[$i];
> }
>
> I would suggest a temporary variable for the array size for a speed
> improvement, because you needn't to retrieve the size in every step.
>
> for ($i = 0, $cnt = count($values); $i < $cnt; $i++) {
> $rv[$keys[$i]] = $values[$i];
> }
>
> greetings
>
> Stefan