CVS update: php3
| From: | zeev | Date: | Fri, 11 Sep 1998 20:21:54 +0000 |
| Subject: | CVS update: php3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-983@lists.php.net to get a copy of this message | ||
Date: Friday September 11, 1998 @ 16:21
Author: zeev
Update of /repository/php3
In directory asf:/u2/tmp/cvs-serv13805
Modified Files:
CODING_STANDARDS
Log Message:
Some syntax guidelines...
Index: php3/CODING_STANDARDS
diff -c php3/CODING_STANDARDS:1.6 php3/CODING_STANDARDS:1.7
*** php3/CODING_STANDARDS:1.6 Thu Sep 10 16:22:32 1998
--- php3/CODING_STANDARDS Fri Sep 11 16:21:50 1998
***************
*** 93,95 ****
--- 93,115 ----
because the Win32 port is MS-Visual C++ specific, and this compiler
is known to accept C++-style comments in C code.
+ [2] Use K&R-style. Of course, we can't and don't want to
+ force anybody to use a style she's not used to, but
+ at the very least, when you write code that goes into the core
+ of PHP or one of its standard modules, please maintain the K&R
+ style. This applies to just about everything, starting with
+ indentation and comment styles and up to function decleration
+ syntax.
+
+ [3] Be generous with whitespace and braces. Always prefer
+ if (foo) {
+ bar;
+ }
+ to
+ if(foo)bar;
+
+ Keep one empty line between the variable decleration section and
+ the statements in a block, as well as between logical statement
+ groups in a block. Maintain at least one empty line between
+ two functions, preferably two.
+
--
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