Re: Should I care about these errors?
| From: | Ashley Sheridan | Date: | Thu, 05 Nov 2009 13:53:51 +0000 |
| Subject: | Re: Should I care about these errors? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299644@lists.php.net to get a copy of this message | ||
On Thu, 2009-11-05 at 23:50 +1000, Angus Mann wrote:
> OK...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...');
>
> They all produce the same result, and I do understand the difference between
> single and double quotes, but I'm looking for general principles here. Are
> there any rules I should follow to help me decide between the choices above?
>
>
>
>
> ----- Original Message -----
> From: "tedd" <tedd.sperling@gmail.com>
> To: "Angus Mann" <angus@angusmann.com>; <php-general@lists.php.net>
> Sent: Thursday, November 05, 2009 11:36 PM
> Subject: Re: [PHP] Should I care about these errors?
>
>
> > At 6:02 PM +1000 11/5/09, Angus Mann wrote:
> >>but I guess my question is "Should I bother?"
> >
> > Yes.
> >
> > Learn to write error free code.
> >
> > Cheers,
> >
> > tedd
> >
> > --
> > -------
> > http://sperling.com r Ú¼
> > Ù_�Æõ
(Þhttp://ancientstones.com
> > http://earthstones.com
>
>
Essentially they are the same. With the obvious difference of type of
quotes used aside, the use of brackets is just down to preference. I
tend not to use them (mind you, I always use print instead of echo -
goes back to my days of learning to program on a c64) but you may find
that working in a team there is a group coding methodology that everyone
tries to use.
Thanks,
Ash
http://www.ashleysheridan.co.uk