note 14276 deleted from language.variables by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 18:47:44 +0000 |
| Subject: | note 14276 deleted from language.variables by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25180@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.