Re: [PHP] echo or print ?

2007-04-21 Thread Richard Lynch
On Sat, April 21, 2007 5:20 pm, Tijnema ! wrote: > But what else would you use a lot in your code? > all commonly used things (like while, if, echo, etc) are just (nearly) > as fast as their alternatives (for, print, etc). > Other functions (like file/stream) might be some performance > difference,

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/22/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > But what else would you use a lot in your code? > all commonly used things (like while, if, echo, etc) are just (nearly) > as fast as their alternatives (for, print, etc). > Other functions (like file/stream) might b

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/22/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > But what else would you use a lot in your code? > all commonly used things (like while, if, echo, etc) are just (nearly) > as fast as their alternatives (for, print, etc). > Other functions (like file/stream) might be some performance

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: But what else would you use a lot in your code? all commonly used things (like while, if, echo, etc) are just (nearly) as fast as their alternatives (for, print, etc). Other functions (like file/stream) might be some performance difference, but you probably use this only a few ti

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/21/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 4/21/07, Stut <[EMAIL PROTECTED]> wrote: >> Tijnema ! wrote: >> > There is a difference, echo is slightly faster. >> > code used for benchmark: >> > > > $start = microtime(TRUE); >> > for ($i=0; $i<10; ++$i) { print "ABC"; } >>

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/21/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > There is a difference, echo is slightly faster. > code used for benchmark: > $start = microtime(TRUE); > for ($i=0; $i<10; ++$i) { print "ABC"; } > echo sprintf("With print ($i): %0.3f\n",microtime(TRUE) - $star

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/21/07, Stut <[EMAIL PROTECTED]> wrote: Tijnema ! wrote: > On 4/18/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: >> > Whenever I see people put their code up for review, I realize they >> > mostly >> > use print instead of echo, while

Re: [PHP] echo or print ?

2007-04-21 Thread Stut
Tijnema ! wrote: On 4/18/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: > Whenever I see people put their code up for review, I realize they > mostly > use print instead of echo, while I am using echo 99% of the time. > Actually, > I can't e

Re: [PHP] echo or print ?

2007-04-21 Thread Tijnema !
On 4/18/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: > Whenever I see people put their code up for review, I realize they > mostly > use print instead of echo, while I am using echo 99% of the time. > Actually, > I can't even remember when

Re: [PHP] echo or print ?

2007-04-17 Thread Richard Lynch
On Tue, April 17, 2007 1:40 am, Christian Haensel wrote: > Whenever I see people put their code up for review, I realize they > mostly > use print instead of echo, while I am using echo 99% of the time. > Actually, > I can't even remember when I last used the regular print. There used to be a diff

Re: [PHP] echo or print ?

2007-04-17 Thread Christian Haensel
: Sent: Tuesday, April 17, 2007 9:48 AM Subject: Re: [PHP] echo or print ? On 4/17/07, Christian Haensel <[EMAIL PROTECTED]> wrote: Good morning fellow coders I've been working with PHP for a little over 5 years now, and it even got me a cute office and a good salary... but even t

Re: [PHP] echo or print ?

2007-04-17 Thread Dimiter Ivanov
On 4/17/07, Christian Haensel <[EMAIL PROTECTED]> wrote: Good morning fellow coders I've been working with PHP for a little over 5 years now, and it even got me a cute office and a good salary... but even though I can make a living off of it, I am still wondering about a few little things. When

Re: [PHP] echo or print ?

2007-04-17 Thread heavyccasey
Me too. I use echo. Print is a function. There's no significant difference between them. My advice: choose one, and stick with it. On 4/16/07, clive <[EMAIL PROTECTED]> wrote: > What do you guys use, and what is the advantage (if ther is any) of > print over echo? And I am not talking about pr

Re: [PHP] echo or print ?

2007-04-17 Thread clive
What do you guys use, and what is the advantage (if ther is any) of print over echo? And I am not talking about print_r or anything, just the regular print. :o) print returns a result, echo doesn't. This makes echo slightly faster than print, but I doubt theres any significant speed improvem

Re: [PHP] echo or print

2003-11-21 Thread Robert Cummings
On Sat, 2003-11-22 at 00:13, Curt Zirzow wrote: > * Thus wrote Wouter van Vliet ([EMAIL PROTECTED]): > > > > Point is, which of the inline printing style is preferred by you guyes. I > > tend to use a lot, since it reads easier but get into struggles > > with myself when I do that multiple times

Re: [PHP] echo or print

2003-11-21 Thread Curt Zirzow
* Thus wrote Wouter van Vliet ([EMAIL PROTECTED]): > > Point is, which of the inline printing style is preferred by you guyes. I > tend to use a lot, since it reads easier but get into struggles > with myself when I do that multiple times in a row. 1. Turn off short_open_tags 2. Turn off asp_tag

Re: [PHP] echo or print

2003-11-21 Thread Jon Kriek
Rasmus Lerdorf "There is a difference between the two, but speed-wise it should be irrelevant which one you use. print() behaves like a function in that you can do: $ret = print "Hello World"; And $ret will be 1 That means that print can be used as part of a more complex expression where echo ca

Re: [PHP] echo or print

2003-11-21 Thread Eugene Lee
On Fri, Nov 21, 2003 at 07:55:05PM +0100, Wouter van Vliet wrote: : : (.. long bunch of HTML ..) : Jay asked , then Tom said . , then... Of course you could call htmlentities() on all of your variables in a previouw block. But then you cannot use the variables again unless you undo it with html_

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
Kelly Hallman wrote: > On Fri, 21 Nov 2003, Wouter van Vliet wrote: >> Point is, which of the inline printing style is preferred by you >> guyes. I tend to use a lot, since it reads easier but get >> into struggles with myself when I do that multiple times in a row. > > Ultimately I think you'd w

RE: [PHP] echo or print

2003-11-21 Thread Chris Shiflett
--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote: > I also prefer to except > that for the sake of cross-system compatibility* I now choose to do > . I think explicitly using echo is much more readable. While it may be obvious to many what * What I mean by that is if I give my code to someone el

RE: [PHP] echo or print

2003-11-21 Thread Kelly Hallman
On Fri, 21 Nov 2003, Wouter van Vliet wrote: > Point is, which of the inline printing style is preferred by you guyes. I > tend to use a lot, since it reads easier but get into struggles > with myself when I do that multiple times in a row. Ultimately I think you'd want to be doing very little of

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
Chris W. Parker wrote: > Wouter van Vliet > on Friday, November 21, 2003 10:55 AM said: > >> Point is, which of the inline printing style is preferred by you >> guyes. I tend to use a lot, since it reads easier but get >> into struggles with myself when I do that mu

RE: [PHP] echo or print

2003-11-21 Thread Chris W. Parker
Wouter van Vliet on Friday, November 21, 2003 10:55 AM said: > Point is, which of the inline printing style is preferred by you > guyes. I tend to use a lot, since it reads easier but get > into struggles with myself when I do that multiple times in a row. Because

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
David T-G wrote: > Eugene, et al -- > > ...and then Eugene Lee said... > % > % > % > % Also, the letter 'e' is smaller than 'p', so ASCII-based > function % lookups will be faster as well. > > Most of these speed increases can't be noticed in a small > script, where the end is within a few lines

Re: [PHP] echo or print

2003-11-21 Thread David T-G
Eugene, et al -- ...and then Eugene Lee said... % % % % Also, the letter 'e' is smaller than 'p', so ASCII-based function % lookups will be faster as well. Most of these speed increases can't be noticed in a small script, where the end is within a few lines, but echo() really works well in lar

Re: [PHP] echo or print

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 12:36:42PM -0500, John W. Holmes wrote: : : Jay Fitzgerald wrote: : > : >when should i use echo ' '; vs. print ' '; : : You should always use echo. It'll make a significant performance : increase in your scripts as it's only four letters instead of five. Also, the lett

Re: [PHP] echo or print

2003-11-20 Thread Burhan Khalid
Tom Rogers wrote: Hi, Friday, November 21, 2003, 12:37:50 AM, you wrote: JF> when should i use echo ' '; vs. print ' '; JF> JF> Jay Fitzgerald, Design Director JF> - Certified Professional Webmaster (CPW-A) JF> - Certified Professional Web Designer

RE: [PHP] echo or print

2003-11-20 Thread Johnson, Kirk
> when should i use echo ' '; vs. print ' '; Here's a link listed in the manual at http://www.php.net/manual/en/function.print.php http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] echo or print

2003-11-20 Thread John W. Holmes
Jay Fitzgerald wrote: when should i use echo ' '; vs. print ' '; You should always use echo. It'll make a significant performance increase in your scripts as it's only four letters instead of five. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The

Re: [PHP] echo or print

2003-11-20 Thread Tom Rogers
Hi, Friday, November 21, 2003, 12:37:50 AM, you wrote: JF> when should i use echo ' '; vs. print ' '; JF> JF> Jay Fitzgerald, Design Director JF> - Certified Professional Webmaster (CPW-A) JF> - Certified Professional Web Designer (CPWDS-A) JF> -