CVS update: php3
| From: | zeev | Date: | Sun, 27 Dec 1998 21:44:36 +0000 |
| Subject: | CVS update: php3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3083@lists.php.net to get a copy of this message | ||
Date: Sunday December 27, 1998 @ 16:44
Author: zeev
Update of /repository/php3
In directory asf:/u/temp/cvs-serv14946
Modified Files:
CODING_STANDARDS
Log Message:
- Fix the regex cache bug (untested)
- Add a paragraph to the coding standards file
Index: php3/CODING_STANDARDS
diff -c php3/CODING_STANDARDS:1.9 php3/CODING_STANDARDS:1.10
*** php3/CODING_STANDARDS:1.9 Wed Nov 18 16:22:56 1998
--- php3/CODING_STANDARDS Sun Dec 27 16:44:36 1998
***************
*** 59,64 ****
--- 59,76 ----
check its man page again, and only then, consider using it, and even then,
try avoiding it.
+ [7] NEVER use initialization of global variables. Global variables should
+ only be initizlized and destructed on the per-request startup/shutdown
+ functions. The reason behind this is that PHP, in its module mode,
+ is practically nothing but a complex function, that is called, and
+ recalled for every hit. Global variable initilaztion only happens once,
+ when the program (in our case, httpd) starts up, when we really want it
+ to happen for every request. This is especially important for pointers
+ that point to emalloc()'d memory - remember that at the end of every
+ request, all emalloc()'d memory is freed, so your pointer would be
+ pointing at garbage, unless you explicitly reinitialize it on every
+ hit.
+
Naming Conventions
------------------
--
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