View Single Post
Old 07-08-2008, 12:30 PM   #4 (permalink)
quantumkangaroo
The Contributor
 
quantumkangaroo's Avatar
 
Join Date: Feb 2008
Location: Pretoria, South Africa
Posts: 38
Thanks: 1
quantumkangaroo is an unknown quantity at this point
Default

Quote:
Originally Posted by Tanax View Post
Classes are a like a bunch of functions, that provides us with a set of options that we can use.
Classes are objects which contain methods, member variables, are able to be inherited and much more, objects make our life as developers easier by cutting down on repetitive code.

Quote:
Originally Posted by Tanax View Post
Also, one thing worth mentioning, is that you need a somewhat new version of php-server in order for it to read the class correctly.
Earlier versions of PHP support classes eg. PHP3/4, these are not somewhat new versions of php, object handling was rewritten in PHP5

Quote:
Originally Posted by Tanax View Post
php Code:
class cellphone {
       
        private $phonenr;
        private $color;
       
    }

As you see, we don't set a value of these variables, we only put them out there.
These variables are called class member variables and you may set a value to them when defining them.

Do a little more research before taking novice users into the world of object orientation?
__________________
virtueCart v1.0.5 developed by WebDevSA

Send a message via MSN to quantumkangaroo Send a message via Skype™ to quantumkangaroo
quantumkangaroo is offline  
Reply With Quote