|
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]
|