RE: [PHP] Classes vs. Functions
| From: | Martin Towell | Date: | Tue, 16 Jul 2002 23:56:18 +0000 |
| Subject: | RE: [PHP] Classes vs. Functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107984@lists.php.net to get a copy of this message | ||
>
> Martin Clifford wrote:
> > Could someone please explain the difference between classes and
functions
> > and how to use a class.
>
> Whether you should like OOP or not is a religious matter, so I will not
> enter the field. OOP has its pluses and its minuses. It's a technique,
> not an ultimate truth, although it is often presented as such. And as
> any technique, it can do wonders and it can do plain bull**t when not
> properly used.
>
> Nowadays 100% of my work is OOP based, but I worked some 15 years on
> functions and I cannot blame those who keep working that way. There are
> reasons for doing it and reason for not to do it. Get yourself a good
> clear book, then make a decision.
[snip]
I have to agree here. IMO, there are benefits in using classes over
functions, and there's benefits in using functions over classes. Once you
get to know oop a little better, you should be able to determine which is
better is any given situation.