Re: Re: cvs: pear /Mail/Mail RFC822.php
| From: | Jon Parise | Date: | Sun, 28 Sep 2003 19:37:01 +0000 |
| Subject: | Re: Re: cvs: pear /Mail/Mail RFC822.php | ||
| References: | 1 2 3 4 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-13158@lists.php.net to get a copy of this message | ||
On Sun, Sep 28, 2003 at 07:08:25PM +0200, Tomas V.V.Cox wrote:
> > On Fri, Sep 26, 2003 at 06:37:06PM +0200, Michael Wallner wrote:
>
> >> Hi Chuck Hagenbuch, you wrote:
> >>
> >> > +
> >> > }
> >> > -?>
> >>
> >> You stripped the closing PHP tag: "?>"
>
> > The closing tag isn't needed in a pure-PHP source file. Functionally,
> > it's only ornamental.
>
> This don't change the fact that confuses a lot of people and should be
> avoided in PEAR :-)
The ternary operator confuses a lot of people, too, but it's still a
useful construct.
There are reports of code without the closing tag being a) slightly
faster (I can't substantiate that, but I assume it has to do with one
less context switch back to HTML mode), and b) more "robust" in that
you don't have to worry about trailing whitespace in the PHP source
file being interpretted as output.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)