Re: Should I care about these errors?
| From: | Robert Cummings | Date: | Thu, 05 Nov 2009 17:26:34 +0000 |
| Subject: | Re: Should I care about these errors? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299657@lists.php.net to get a copy of this message | ||
tedd wrote:
At 11:50 PM +1000 11/5/09, Angus Mann wrote:This is really a personal preference. The same issue arises with the use of require, require_once, include, and include_once. None of these are functions (just like echo) and so they do not need the parenthesis. That said... for eacho I prefer to leave the parenthesis off since it makes formatting of text more convenient. However for require, include, etc... I usually add parenthesis so that it looks like a function :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHPOK...point taken. On a partly related matter, which of the following is "correct" or "Better" ? echo("Stuff to display..."); or echo 'Stuff to display...'; or echo "Stuff to display..."; or echo('Stuff to display...');I use:echo('Stuff to display...');First, it easy for me to read. Second, the processor doe not evaluate the contents. However,echo 'Stuff to display...';is probably the more "purest" route. You don't need the parenthesis. If you have a variable in the mix, then use double quotes, such as:echo("Stuff to display... $stuff");