Re: String parsing issue in PHP 4.3.10?
| From: | Curt Zirzow | Date: | Tue, 21 Dec 2004 16:40:20 +0000 |
| Subject: | Re: String parsing issue in PHP 4.3.10? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204970@lists.php.net to get a copy of this message | ||
* Thus wrote Jason Wong:
> On Wednesday 22 December 2004 08:18, John Holmes wrote:
>
> > It is, I guess.
> >
> > <?php
> >
> > $a = ' ?> ';
> > $b = ' ?> ';
> >
> > ?>
> >
> > will work just fine. If you try to comment out either line, though, the PHP
> > processing will end at the ?> and spit out the rest as plain text. So, text
> > can have as many ?> as you want and the only issue comes when you try to
> > comment one of them out.
>
> I'm sure it must be documented behaviour, because my syntax highlighting
> editor seems to be aware of it. When I stick // in front of $a, the colour
> for comments stop just before the ?>. And a quick check of the manual
> confirms that it is documented behaviour.
http://php.net/language.basic-syntax.comments
<snip>
The one-line comment styles actually only comment to the end of
the line or the current block of PHP code, whichever comes first.
</snip>
Curt
--
Quoth the Raven, "Nevermore."