In case you haven't been reading, here is the series so far:
With the advent of PHP 5, object oriented programming is a central part of the code body. If you haven't jumped on board, or at least tested the waters of OOP, you are a total looser. Fortunately, I am too, so I am taking the effort to learn it. As I work my way through it, I will share the things I learn.
Showing Some Class
First, I have started to grasp the basics of OOP. The central part of OOP are the concepts of classes and objects. In its most simple form, a class is the code template used to create an object. Additionally, an object is simply an implementation of a class.
A class looks something like:
class MyFirstClass {
// class body
}
To implement a class, all you need is:
$implementation = new MyFirstClass();
So there you have it, the very basics of OOP. Next, methods and constructors.