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: Joseph Engo
Subject: Re: [Phpgroupware-developers] i++ versus ++i
Date: Fri, 06 Feb 2004 13:42:40 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, first off that page is for C++.  I am not sure if the same
applys to PHP or not.  It would be interesting to research.

This is the first I am hearing about echo vs print.  Honestly, what
are the differences if any ?  I have personally used echo since I
started in PHP.  Why ?  I don't know, I guess to be different from the
other languages I use.

Joseph Engo

Chris Weiss wrote:

|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
|>
|
|
|
|_______________________________________________
|Phpgroupware-developers mailing list
|address@hidden
|http://mail.gnu.org/mailman/listinfo/phpgroupware-developers


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAI+Ad/AzmiD/o0voRAlZxAJ9MmZZU0F0CyvTatHMjQxWyARCmLwCcCpLV
z+ylUe3uFtephC9DjvHPMTI=
=7zjM
-----END PGP SIGNATURE-----






reply via email to

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