2008. 01. 17, csütörtök keltezéssel 15.01-kor Richard Lynch ezt írta: > On Thu, January 17, 2008 2:06 am, Jochem Maas wrote: > > Richard Lynch schreef: > >> On Wed, January 16, 2008 9:57 am, Daniel Brown wrote: > >>> echo($h."\n".$i."\n"); // echo is a construct, but as expected, can > >>> use parentheses() > >> > >> Just to be picuyane: > >> > >> echo isn't using the parens. > >> > >> The parens are forcing PHP to evaluate the concatenation of the > >> strings FIRST, and then echo them. > >> > >> And since the concatenation operator takes precedence over the > >> language construct, the parens are basically useless cruft. > > > > not to mention that it should be written as (spaces are optional ;-)): > > > > echo $h, "\n", $i, "\n"; > > > > which avoids any concat operation and dumps the result of each > > expression > > direct to the buffer :-) > > I wanted to avoid the whole concat versus multi-arg performance > thread, since it usually takes about a week before somebody posts the > definitive answer, showing the actual PHP opcodes generated... no, this time it won't take a week, as I have the answer at hand ;) http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html > > And I don't recall the answer, and don't give a [bleep] since it's > almost never the bottleneck in an application in the first place... you're absolutely right in that, personally I don't care about it either when coding. however the above article is an interesting read :) greets Zoltán Németh > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some indie artist. > http://cdbaby.com/from/lynch > Yeah, I get a buck. So? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php