CVS update: php3/doc/chapters

From: Date: Sun, 23 May 1999 01:09:44 +0000
Subject: CVS update: php3/doc/chapters
Groups: php.dev 
Request: Send a blank email to php-dev+get-5891@lists.php.net to get a copy of this message
Date: Saturday May 22, 1999 @ 21:09 Author: paul Update of /repository/php3/doc/chapters In directory php:/tmp/cvs-serv13610/chapters Modified Files: lang-syntax.sgml Log Message: Added docs on how to comment code (basic, yet it shoudl be there) I'm open for feedback if people feel this is the wrong section If there are more comment styles supported then c and c++ let me know Index: php3/doc/chapters/lang-syntax.sgml diff -u php3/doc/chapters/lang-syntax.sgml:1.36 php3/doc/chapters/lang-syntax.sgml:1.37 --- php3/doc/chapters/lang-syntax.sgml:1.36 Sun May 16 10:14:47 1999 +++ php3/doc/chapters/lang-syntax.sgml Sat May 22 21:09:44 1999 @@ -50,6 +50,38 @@ </programlisting> </informalexample> + <sect1 id="comment-syntax"> + <title>Commenting Code</title> + + <para> + PHP supports both the 'C' and 'C++' style comments. For example: + + <informalexample> + <programlisting> +&lt;?php + echo "This is a test"; // This is a one-line c++ style comment + /* This is a multi line comment + yet another line of comment */ + echo "This is yet another test"; + +?> + </programlisting> + </informalexample> + <simpara> + You should be careful not to embed 'C' style comments, which can happen when commenting + out large blocks, as this will cause problems: + + <informalexample> + <programlisting> +&lt;?php + /* + echo "This is a test"; /* This comment will cause a problem */ + + */ +?> + </programlisting> + </informalexample> + <sect1 id="variable-types"> <title>Variable types</title> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5891) next »