You are here: Re: classes and var declarations « PHP Programming Language « IT news, forums, messages
Re: classes and var declarations

Posted by Richard Levasseur on 02/19/06 07:43

It is good programming practice to declare all the class and object
members at the start. That way, when you or someone else goes back to
modify it 6 months later you have a better idea of what is going on.

Secondly, if you were to receive an arbitrary object of that type, you
know what is available to use without having to rely on some technique
to tell you what was set/not-set during the course of the objects
lifetime.

If you have a lot of variables in a class, but are only using a few at
a time, then you may want to reconsider the object and the breakdown of
them.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация