You are here: Re: Three different ways to create a new Smarty object? « PHP Programming Language « IT news, forums, messages
Re: Three different ways to create a new Smarty object?

Posted by rockstar on 05/18/06 22:59

William,

The first two are pretty much the same. You don't really NEED to put
the () at the end of the Smarty object, but it's one of those "nice
things to do" in your code. It just helps people see creation of an
instance of the smarty object. I can follow code better that way.
Smarty itself doesn't require you to pass anything into it on
instantiation, but some objects do, so it's good to get into the habit.
The last one, I BELIEVE is creating a reference. I don't completely
understand php references (as my "mentor" of sorts doesn't really
either), but I've never had a need to use =&, and it seems to me to be
a hack rather than serve a good purpose. Stick with the middle one,
and it'll make everything much cleaner.

Paul
http://eventuallyanyway.com

 

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

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