You are here: Re: php bug? strange end of php file error « PHP Programming Language « IT news, forums, messages
Re: php bug? strange end of php file error

Posted by gosha bine on 09/07/07 21:26

Fabio wrote:
> "gosha bine" <stereofrog@gmail.com> ha scritto nel messaggio
> news:46e17257$0$31118$6e1ede2f@read.cnntp.org...
>> On 07.09.2007 17:31 Fabio wrote:
>>> Why this code
>>>
>>> <?php
>>> function X()
>>> {
>>> // echo("commented ?>");
>>> }
>>> X();
>>> ?>
>>>
>>> give the error
>>> "Parse error: syntax error, unexpected $end"
>>>
>>> ???
>>>
>>> ?> is into a string commented!
>> no, it is not. There's no "strings" inside comments, comment is a stream
>> of characters and does take ?> into account. I don't think this is a good
>> idea either, but so is it.
>
> but
>
> /* echo("commented ?>"); */
>
> works well... :(
>
>
>
>
Yet again, this has nothing to do with if you have quotes inside
comments or not. "/* blah ?> */" doesn't break out of php mode, "// blah
?>" or "# blah ?>" do. A bit odd in my opinion, but this is how it's
intended to work (see Language/Comments in manual).




--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация