t: Re: [PHP] functions vs classes
At the most basic level a class allows you to group your functions
together. On small projects, grouping of functions may not seem to buy
you anything. But the bigger the project gets, the more you would like
to be able to keep your functions separated
At the most basic level a class allows you to group your functions
together. On small projects, grouping of functions may not seem to buy
you anything. But the bigger the project gets, the more you would like
to be able to keep your functions separated into groups.
One simple advantage of class
Hello,
Quite good and short answer to your question:
http://answers.google.com/answers/threadview?id=207071
--
Domas Juknevicius
DuSTiN KRySaK wrote:
> 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.
>
> Th
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 structure
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.
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.
is this correct?
Although on
5 matches
Mail list logo