[Phpmyadmin-devel] use of count() in for loops

Hugues Peccatte hugues.peccatte at gmail.com
Sun Feb 16 16:25:10 CET 2014


Hi,

2014-02-14 23:21 GMT+01:00 Minhaz A V <minhazav at gmail.com>:

> Hi,
> I was going through the codes and at many places I found use of *count() *inside
> the *for* statement.
> I think statements like
>
> *for($i = 0; $i < count($arr); $i++)*
> should be converted with statements like
>
> *$len = count($arr);*
> *for($i = 0; $i < $len; $i++)*
>
> this would help us speed up the whole phpMyAdmin system.
>

You're right. The second write is better. But as you said in your second
mail, we try to avoid the first syntax.
If you find the use of count into a loop, please fix it a send a pull
request.

Thanks,
Hugues.

>
>
> Regards,
> Minhaz
> cistoner.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140216/e59fe4d1/attachment.html>


More information about the Developers mailing list