Re: String parsing issue in PHP 4.3.10?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux