cvs: phpdoc /RFC coding_standards
| From: | Hannes Magnusson | Date: | Fri, 28 Dec 2007 15:25:01 +0000 |
| Subject: | cvs: phpdoc /RFC coding_standards | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-895@lists.php.net to get a copy of this message | ||
bjori Fri Dec 28 15:25:01 2007 UTC
Modified files:
/phpdoc/RFC coding_standards
Log:
- Add "see also" (not use entitys in examples since they should be CDATA)
- Add a note about example IDs
- Make it clear that examples should not throw E_STRICT errors either
http://cvs.php.net/viewvc.cgi/phpdoc/RFC/coding_standards?r1=1.7&r2=1.8&diff_format=u
Index: phpdoc/RFC/coding_standards
diff -u phpdoc/RFC/coding_standards:1.7 phpdoc/RFC/coding_standards:1.8
--- phpdoc/RFC/coding_standards:1.7 Wed Jan 19 15:46:36 2005
+++ phpdoc/RFC/coding_standards Fri Dec 28 15:25:01 2007
@@ -13,7 +13,7 @@
- Work with register_globals on or off
- When appropriate, use superglobals
- - Never generate PHP errors (E_ALL friendly)
+ - Never generate PHP errors (E_ALL|E_STRICT friendly)
- Be short and generic
- Follow the PEAR coding standards
@@ -71,7 +71,7 @@
8. Use of booleans in examples
Do not use entities such as &true; in examples but instead write them
- out as TRUE, FALSE, and/or NULL.
+ out as TRUE, FALSE, and/or NULL. (See point#5)
9. Spacing
@@ -97,6 +97,11 @@
return $str;
}
?>
+10. IDs
+
+ It is a good idea to add xml:id to the examples. IDs generate anchors and
+ make it possible to list them in an Example Listing Appendix in the future.
+
ERROR HANDLING