NYCPHP Meetup

NYPHP.org

[nycphp-talk] Length of variable names

Jon Baer jonbaer at jonbaer.com
Tue Jul 3 10:05:49 EDT 2007


Should probably stick w/ Zend coding standards ...

http://framework.zend.com/manual/en/coding-standard.naming- 
conventions.html#coding-standard.naming-conventions.variables

But I think all you really need to do is answer the question, "If  
someone else were to takeover my code would they understand it @  
first glance".  Ive had people come back to me three or four times  
when I first started PHP and realized time to change the way the code  
looks/feels.  Ehh not to say it still doesn't happen, maybe less  
frequently :-)

- Jon

On Jul 3, 2007, at 9:49 AM, David Krings wrote:

> Hi!
>
> Is there any (noticeable) difference between using short variable  
> names and long ones? I rather use variable names such as  
> $firstnamecounter than just $i, $john, or $doe (I've seen code  
> where the developer used almost exclusively his first and last name  
> for just about everything).
> I try to give each important variable a name that is descriptive  
> and unique within my project so that I can name the same thing by  
> the same name across multiple scripts.
>
> I just wonder if I should get used to a different naming convention  
> now that my projects get more complex.
>
> David
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070703/53344a23/attachment.html>


More information about the talk mailing list