php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65347 Comments should be nestable
Submitted: 2013-07-26 18:53 UTC Modified: 2013-07-26 22:50 UTC
From: TorrAB at Yahoo dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.4.17 OS: WindowsXP
Private report: No CVE-ID: None
 [2013-07-26 18:53 UTC] TorrAB at Yahoo dot com
Description:
------------
---
From manual page: http://www.php.net/language.basic-syntax.comments
---
Comments should be nestable:
/*some code being bypassed /*comment: watch out for 0.*/more code bypassed*/



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-26 22:43 UTC] yohgaki@php.net
-Type: Feature/Change Request +Type: Documentation Problem
 [2013-07-26 22:43 UTC] yohgaki@php.net
You may escape comment strings as follows.

<?php
/* aa \/* bb *\/ cc*/
echo 9999;
?>

It would be easy job for smart editors.
However, it seems this is not documented.
 [2013-07-26 22:50 UTC] bjori@php.net
-Status: Open +Status: Not a bug
 [2013-07-26 22:50 UTC] bjori@php.net
Seriously?


Its documented on the page he linked to.
"'C' style comments end at the first */ encountered. Make sure you don't nest 'C' 
style comments. It is easy to make this mistake if you are trying to comment out 
a large block of code."
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 13:01:30 2025 UTC