Re: Single-line comment problem
| From: | Scott MacVicar | Date: | Thu, 08 Jul 2010 20:12:49 +0000 |
| Subject: | Re: Single-line comment problem | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49014@lists.php.net to get a copy of this message | ||
Yeah because /* */ has a clear end where // and # doesn't.
- S
On 8 Jul 2010, at 12:50, "jvlad" <dmda@yandex.ru> wrote:
>> Parsing ends with ?> regardless if its a comment or not but its not
>> context sensitive. It can't understand that its within a string.
>>
>> - S
>
> Not exactly, it's only // comment style does not comment the tag while /* */
> does.
> The following script outputs its 'afafa':
>
> <?php
> if(true){
> /* echo '<?php date('Y-m-d H:i:s'); ?>'; */
> echo 'afafa';
> }
> ?>
>
> -j
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>