RE: [PHP] comment followed by ?> fails to parse
| From: | Thalis A. Kalfigopoulos | Date: | Wed, 29 May 2002 14:21:54 +0000 |
| Subject: | RE: [PHP] comment followed by ?> fails to parse | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99745@lists.php.net to get a copy of this message | ||
On Wed, 29 May 2002, Ford, Mike [LSS] wrote:
> > -----Original Message-----
> > From: Thalis A. Kalfigopoulos [mailto:thalis@cs.pitt.edu]
> > Sent: 28 May 2002 20:21
> >
> > If I write a comment line with // and I include in it ?> then
> > it fails to parse the rest of the page because (i'm guessing)
> > the parser gets confused and goes off PHP mode.
> > Is this normal? Shouldn't I be able to write literally
> > ANYTHING on a comment line?
>
> Quoting from œ$Ê^O=
> ÖiÿÁ{ß�ïhttp://www.php.net/manual/en/language.basic-syntax.comments.php:
>
> The "one-line" comment styles actually only comment to the end
> of the line or the current block of PHP code, whichever comes
> first.
>
> So this is documented behaviour.
Good to know it's documented. Sorry for falling short on my reading skills. But the question
is: is this decision justified? It would seem more logical to treat a comment for what it is: a
comment. Any developer find it easy to comment further on this?
TIA,
thalis