In article <[EMAIL PROTECTED]>, "Joe
Sheble (Wizaerd)" <[EMAIL PROTECTED]> wrote:
depending on the nature of what you are doing, one of the things
that i like about using classes is the ability to group functionality
under a larger structure, the class. Instead of having a series of
disconnected functions, i can instead write them as class methods.
another feature that is a basic feature of oop stuff is the idea of
inheritence. So you can have a base class (CAR) that defines
behaviour common to all instanaces of that class (var wheels, var door,
method car start, method car turn signal on, etc...) Then you can
subclass the CAR class to define specific behaviour for a particular
car model (SPORTSCAR - var turbo, method car turbo on, etc..).
again, depending on what you are doing, this can be very beneficial.
I suggest you start small and also take a look at other people's code.
You will find alot of classes out there that make alot of sense and
can give you ideas of new ways of doing things....
Jeff
> I've been using PHP for over a year now and have been successfully
> running three different websites developed with PHP, but I've never
> done anything with classes or objects. Even when returning data from a
> mySQL database, I use mysql_fetch_array() instead of
> mysql_fetch_object().
>
> What am I missing by not using objects and classes, other than
> reusability? What are the real benefits to using OOPs in PHP?
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]