Re: New years resolution: To get serious with my programming! Anyone wanna help? :)

From: Date: Thu, 17 Jan 2008 08:06:55 +0000
Subject: Re: New years resolution: To get serious with my programming! Anyone wanna help? :)
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-267484@lists.php.net to get a copy of this message
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 :-)


« previous php.general (#267484) next »