Edit report at https://bugs.php.net/bug.php?id=65344&edit=1
ID: 65344
User updated by: marshall dot sorenson at gmail dot com
Reported by: marshall dot sorenson at gmail dot com
Summary: Script source commenting, add syntax which allows
nesting
-Status: Closed
+Status: Assigned
Type: Feature/Change Request
Package: *General Issues
Operating System: Any
PHP Version: Irrelevant
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
The functionality you gave an example of definitely does NOT work in all cases.
For instance, that can't be used to "comment" out class methods.
Previous Comments:
------------------------------------------------------------------------
[2013-07-29 18:17:31] [email protected]
The functionality you're looking for is already there,
if ($cond1) {
function hello() { /* version 1 */ }
} else if ($cond2) {
function hello() { /* version 2 */ }
} else ....
------------------------------------------------------------------------
[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