note 28665 deleted from language.basic-syntax.comments by vrana

From: Date: Wed, 10 Dec 2003 13:05:11 +0000
Subject: note 28665 deleted from language.basic-syntax.comments by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-61736@lists.php.net to get a copy of this message
Note Submitter: mattb@columbia.edu ---- The whole // behavior is *really* annoying: <?php //echo '<?xml ... ?>'; // Huh? ?> This will actually output: '; // Huh? ?> Because the close tag is found within the // comment. This is totally counterintuitive, so watch out for it. (IMO, this is either bad design or probably a hard-to-fix parser bug that turned into a "feature".) It seems there is only one convenience this presents (i.e., for one-liner php excerpts in HTML) at the bane of good commenting behavior (i.e., that // should be used for most comments, and /* */ should be researved for headers or commenting out large blocks of code when testing). My advice: BEWARE BEWARE BEWARE!

« previous php.notes (#61736) next »