summaryrefslogtreecommitdiff
path: root/CODING_STANDARDS
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-09-09 07:52:39 +0000
committerDerick Rethans <derick@php.net>2002-09-09 07:52:39 +0000
commit8e7147a1cb4fc45480bb278478e7ab2019abffbb (patch)
tree6a0bcba02516000230418c9c6198b48ae0b3999e /CODING_STANDARDS
parente15e0336ded290586eecf4a1ebcacc5fca62c920 (diff)
downloadphp-git-8e7147a1cb4fc45480bb278478e7ab2019abffbb.tar.gz
- Use PHP_ instead of ZEND_
Diffstat (limited to 'CODING_STANDARDS')
-rw-r--r--CODING_STANDARDS11
1 files changed, 6 insertions, 5 deletions
diff --git a/CODING_STANDARDS b/CODING_STANDARDS
index 449e07248c..ece915e1fc 100644
--- a/CODING_STANDARDS
+++ b/CODING_STANDARDS
@@ -96,9 +96,10 @@ Exceptions:
check its man page again, and only then, consider using it, and even then,
try avoiding it.
-[7] Use ZEND_* macros instead of PHP_* macros. Use of PHP_* macros is not
- recommended. Since most of the PHP_* macros are ZEND_* macro aliases, using
- the PHP_* macros makes browsing the source code with a tag search harder.
+[7] Use PHP_* macros in the PHP source, and ZEND_* macros in the Zend
+ part of the source. Although the PHP_* macro's are mostly aliased to the
+ ZEND_* macros it gives a better understanding on what kind of macro you're
+ calling.
[8] Use assert(). assert.h is included in php.h if it is available. Not only
does good assertion catch bugs, but it also helps with code readability.
@@ -125,7 +126,7 @@ Naming Conventions
------------------
[1] Function names for user-level functions should be enclosed with in
- the ZEND_FUNCTION() macro. They should be in lowercase, with words
+ the PHP_FUNCTION() macro. They should be in lowercase, with words
underscore delimited, with care taken to minimize the letter count.
Abbreviations should not be used when they greatly decrease the
readability of the function name itself.
@@ -226,7 +227,7 @@ function does. It would look like this:
/* {{{ proto int abs(int number)
Returns the absolute value of the number */
-ZEND_FUNCTION(abs)
+PHP_FUNCTION(abs)
{
...
}