|
Posted by Lars B. Jensen on 10/05/84 11:13
> Novice PHPer, and i am wondering why one would use a function instead of a
> class (or object)? They seem to server very similar in use.
All depends on the specific use and situation - pros and cons by both
models, for speed and performance, I mostly use optimized functions sorted
out in structured files for easy reuse, rather than objects. PHP5 seem to
embrase object orientation more, so lets see if a war starts again - it's
religion. Think before you program.
> The way I see it, is a function if for repeated use in a project specific
> manner, where as a class could be used for many projects.
It's precisely the same, if you include a file with your class or include a
file with your functions, whats the difference ? none.
--
Lars B. Jensen, Internet Architect
CareerCross Japan
Japan's premier online career resource for english speaking professionals
http://www.careercross.com
[Back to original message]
|