note 67189 deleted from language.basic-syntax.comments by cmb
| From: | cmb@php.net | Date: | Tue, 12 Jul 2016 23:01:37 +0000 |
| Subject: | note 67189 deleted from language.basic-syntax.comments by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205984@lists.php.net to get a copy of this message | ||
Note Submitter: mst_NO_SPAM_TO_ME at mstsoft dot com
----
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 :-)