note 14275 added to pear.standards.constants.php
| From: | bobt at elmwood dot com | Date: | Tue, 24 Jul 2001 22:46:27 +0000 |
| Subject: | note 14275 added to pear.standards.constants.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15796@lists.php.net to get a copy of this message | ||
Naming conventions for variables.
When reading code, it is important to be able to easily tell where a variable came from, and what
kind of variable it is.
To this end, I use:
$lv_ for local, throwaway variables
$sv_ for session variable
$sc_ for session constant
$fv_ for form variable
$fc_ for form constant ( provided by "hidden" tag )
Personally, I don't like PHP constants, because they don't require the leading $, and I
don't like much of anything in all upper case. This is why I use "$sc_". It just
tells me this value should never be changed.
http://www.php.net/manual/en/pear.standards.constants.php