note 67189 added to language.basic-syntax.comments

From: Date: Mon, 05 Jun 2006 12:38:23 +0000
Subject: note 67189 added to language.basic-syntax.comments
Groups: php.notes 
Request: Send a blank email to php-notes+get-113240@lists.php.net to get a copy of this message
This "comment ends on line break or end of PHP Block" thing can be confusing. I discovered this by accident when working with XML Output from PHP... <?PHP header("Content-type: text/xml"); /* echo "<?xml version=\"1.0\"?>"; echo "<page>multi-line comments work as expected.</page>"; */ //echo "<?xml version=\"1.0\"?>"; //echo "<page>single-line comments end php mode and output your code.</page>"; ?> I would expect the comment to work, but there is no parsing in comments so the String suddenly becomes a PHP end-block tag, which is correct reading this documentation. cheers, martin PS: You even see the behavior in the Syntax highlighting :-) ---- Server IP: 66.163.161.117 Probable Submitter: 84.151.252.197 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.basic-syntax.comments.php Edit -- http://master.php.net/note/edit/67189 Del: integrated -- http://master.php.net/note/delete/67189/integrated Del: useless -- http://master.php.net/note/delete/67189/useless Del: bad code -- http://master.php.net/note/delete/67189/bad+code Del: spam -- http://master.php.net/note/delete/67189/spam Del: non-english -- http://master.php.net/note/delete/67189/non-english Del: in docs -- http://master.php.net/note/delete/67189/in+docs Del: other reasons-- http://master.php.net/note/delete/67189 Reject -- http://master.php.net/note/reject/67189 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#113240) next »