Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DeveloperTutorials.com:
Getting Started with Objects with PHP5
Jul 01, 2005 @ 11:49:41

DeveloperTutorials.com has a new tutorial posted over in their PHP section today about getting started with objects in PHP5.

This article describes the fundamentals of objects and classes in PHP V5, from the very basics through to inheritance, for experienced object-oriented programmers and those who have not yet been introduced to objects.

As a PHP programmer, you know variables and functions inside-out. Classes and objects, though, might be a different matter. It's possible to create perfectly good systems without defining a single class. Even if you decide to stay away from object-oriented programming in your own code, you will likely need to know object-oriented programming. For example, if you use a third-party library, such as those made available by PHP Extension and Application Repository (PEAR), you will find yourself instantiating objects and calling methods.

They continue on, discussing what classes/objects are, walk you through a sample class (constructor and all) and then shows one of the most important aspects of OOP in PHP5 - the private/public settings you can apply.

tagged:

Link:


Trending Topics: