|
||||
PHP OOP - The basics of php objects
php objects, php oop, simple php objects, easy php oop Added: 2009-01-04 00:43:19 PHP's OOP is a useful tool, this article will present the basics of PHP OOP, from creating a new class to creating your first method. First use the class keyword to contain your class methods and properties.
Ok so thats how to create the class container so what about the methods and properties. First we will define some basic properties using the private keyword, the private keyword defines the properties as private to the class, therefore the property cannot be accessed from outside of the object, or from any class extensions.
The output of the above script would be
This is a simple example of creating an object with a methods and properties.
Copyright MySpaza.Co.Uk - 2010
|
||||
Comments from other users: