This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
build #2006, 11 April Source code: <?php // put your code here //?> Result Editor does not highlight "//?>" as comments and sense this tag as not commented So it may be couse of errors after this string.
the same situation for //<?php
This is strange behavior of the php runtime, where the end delimiter ?> is active even in the comments. Our editor has to reflect the runtime. See comments in http://us2.php.net/manual/en/language.basic-syntax.comments.php. Regarding //<?php, this is treated as really php comment so it depends where it is. If it located in the php code, then it's comment. If it is located in the html code like after //?> then it is php start delimiter.
another sample <?php $s="d"; //<?php //?> ?> result: first tag of php end is commented but highlighted as not commented second tag of php end not highlighted at all becouse first tag s not commented
Please, read the specification. The first tag is not commented, because php end tag even in the comment is threated as end php tag. <?php -> open php tag $s="d"; -> a php code //<?php -> php comment containing open php tag, which is comment //?> -> php comment containing close php tag, but the close php tag is not treated as comment ?> -> html text, because the pho block is closed by previous php close tag One not from the link, which I add in my previous comment: "//?> is not treated as commented text, this is a result of having to handle code on one line such as <?php echo 'something'; //comment ?>"
Ok I read manual. Zend has the same behaviour. Thank You. I had some misunderstanding in the question.