Req #65344 [Opn->Csd]: Script source commenting, add syntax which allows nesting
| From: | ab@php.net | Date: | Mon, 29 Jul 2013 18:17:31 +0000 |
| Subject: | Req #65344 [Opn->Csd]: Script source commenting, add syntax which allows nesting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180543@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65344&edit=1
ID: 65344
Updated by: ab@php.net
Reported by: marshall dot sorenson at gmail dot com
Summary: Script source commenting, add syntax which allows
nesting
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: *General Issues
Operating System: Any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: ab
Block user comment: N
Private report: N
New Comment:
The functionality you're looking for is already there,
if ($cond1) {
function hello() { /* version 1 */ }
} else if ($cond2) {
function hello() { /* version 2 */ }
} else ....
Previous Comments:
------------------------------------------------------------------------
[2013-07-26 14:12:02] marshall dot sorenson at gmail dot com
Description:
------------
It would be AMAZING if there was an additional extended comment syntax which
allowed nesting and overrode C-style comments. The idea would be to only match
the last comment closure per file to allow commenting out large blocks of
functions which are PHPdoc'd or where a developer used C-style comments for
multi-line comments.
This would only be useful during development since scripts would have to be
backwards compatible with older PHP versions. I have been a PHP developer for 12
years and this would help immensely when debugging code "inherited" from another
developer!
Even if it could only be enabled with a run time INI setting, that would be
fantastic just to have it available. Perhaps even the tokens could be customized
via INI setting.
I am imagining something like this...
/*===
foo
// bar
# baz
/* fu */
===*/
man
/* chu */
===*/
If there is any interest in this I would be willing to work on the patch but
would need some mentoring.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65344&edit=1