#31491 [Bgs->Opn]: Comment (/* */) parsing is also done inside strings

From: Date: Tue, 11 Jan 2005 13:33:05 +0000
Subject: #31491 [Bgs->Opn]: Comment (/* */) parsing is also done inside strings
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969365918@lists.php.net to get a copy of this message
ID: 31491 User updated by: jeroen at unfix dot org Reported By: jeroen at unfix dot org -Status: Bogus +Status: Open Bug Type: Documentation problem Operating System: any PHP Version: 5.0.3 New Comment: No, it is not a dupe, it is a documentation problem. re-read it please. Previous Comments: ------------------------------------------------------------------------ [2005-01-11 13:45:50] vrana@php.net Duplicate to #31395. ------------------------------------------------------------------------ [2005-01-11 13:00:41] jeroen at unfix dot org One cannot nest C comments, so that is clearly incorrect ;) ------------------------------------------------------------------------ [2005-01-11 12:56:14] tony2001@php.net The docs clearly say: "You should be careful not to nest 'C' style comments, which can happen when commenting out large blocks." (c) http://www.php.net/manual/en/language.basic-syntax.comments.php ------------------------------------------------------------------------ [2005-01-11 12:48:43] jeroen at unfix dot org Compiling that works fine with GCC++, Intel C++ and Visual C++. Thus fix the documentation on the PHP site. Indeed, it does not compile with C, but it does with a C++ compiler. C doesn't allow nested /* */ commenting. ------------------------------------------------------------------------ [2005-01-11 12:33:53] tony2001@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Try to compile this: #include <stdlib.h> int main() { /* printf("*/"); */ return 1; } ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31491 -- Edit this bug report at http://bugs.php.net/?id=31491&edit=1

« previous php.doc (#969365918) next »