phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] i++ versus ++i


From: Chris Weiss
Subject: Re: [Phpgroupware-developers] i++ versus ++i
Date: Fri, 06 Feb 2004 16:50:34 +0000

noted.  IMO not worth chnaging old code unless you're redoing that area
anyway.  It's very a minimal cost (kind of like echo vs print) and changing it
any places where it's used inline will intruduce bugs.

Kai Hofmann (address@hidden) wrote:
>
> Just for info, why it is better to use ++$i instead of $i++
>
> source: http://www.gotw.ca/gotw/002.htm
>
> Preincrement is more efficient than postincrement, because for postincrement
> the object must increment itself and then return a temporary containing its
> old value. Note that this is true even for builtins like int!
>
> [Guideline] Prefer preincrement, avoid postincrement.
>
>
>
> Have a happy weekend.
>
>   Kai/PowerStat
>
> --
> *****    Open Source und Linux im professionellen Einsatz    *****
> **  komplexe Mailserver, Groupware, Office: sprechen Sie uns an **
> Dipl.-Inform. Kai Hofmann                    Team Softwarelösungen
> pro|business AG, EXPO Plaza 1 (Deutscher Pavillon), 30539 Hannover
> E-Mail: address@hidden,   Tel.: 0511/60066-332, Fax: -355
> WWW: http://www.probusiness.de/
>
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]