note 32604 added to language.basic-syntax.comments

From: Date: Mon, 02 Jun 2003 18:14:07 +0000
Subject: note 32604 added to language.basic-syntax.comments
Groups: php.notes 
Request: Send a blank email to php-notes+get-49580@lists.php.net to get a copy of this message
For large blocks of comments I use the following syntax: if (0) {?><!-- code --><? } I use this syntax since I will almost always have /* */ pairs in a long block of code, although I rarely if ever use HTML commenting. Just doing ?><!-- code --><? Would also work, but it sends the output to the browser, which prevents me from using the header(). Slapping the if(0) around it prevents it from going to the browser. The other nice side effect is that in color coded editors (I use HomeSite) it will show the contents of the comment in the same color as the HTML so it really stands out as commented code. John ---- Manual Page -- http://www.php.net/manual/en/language.basic-syntax.comments.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32604 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32604&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32604&report=yes

« previous php.notes (#49580) next »