From: Jon Parise Date: Tue, 17 Jul 2001 23:55:10 +0000 (+0000) Subject: Describe the standards for function naming and private methods. X-Git-Tag: PRE_TSRM_MERGE_PATCH~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36868ff301c2f0390007736996ead175a93f31cd;p=php Describe the standards for function naming and private methods. --- diff --git a/pear/CODING_STANDARDS b/pear/CODING_STANDARDS index cd48d1546b..852b49c70e 100644 --- a/pear/CODING_STANDARDS +++ b/pear/CODING_STANDARDS @@ -123,6 +123,18 @@ function connect(&$dsn, $persistent = false) return true; } +Functions should be named using the "studly caps" style (also referred to as +"bumpy case" or "camel caps". The initial letter of the name is lowercase, +and each letter that starts a new "word" is capitalized. Some examples: + + connect() getData() buildSomeWidget() + +Private methods (meaning methods that an intented to be called only from +within the same class; PHP does not yet support truly-enforceable private +namespaces) are preceeded by a single underscore. For example: + + _sort() _initTree() _validateInput() + ------------ [5] Comments