Re: Short Names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



IMHO, no -- it makes the code more readable.  I'd also recommend making
sure that variable names match their purpose (so, for instance, if you
have a variable that contains a mailing address, use $mailing_addr, or
if you have a variable that contains an array of recipes, use
$arr_recipes).  The more you can make your code readable, the better.

Always keep in mind the other people that may read your code -- this, in
general, means commenting and using good sense in variable names.  It'll
help you later for when you haven't touched the code in a year or two
and need to know what you wrote and why...

Hope this helps.
-- 
Peter Ellis - pellis@xxxxxxxxxxxxxxx
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/

On Sat, 2004-09-25 at 14:23 -0700, Cole S. Ashcraft wrote:
> Is it considered bad / sloppy to define the short names of varibales at 
> the beginning of your code so you don't have to type out 
> $_REQUEST[variable] or $HTTP_REQUEST_VARS[variable]?
> 
> Cole
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux