OOP in PHP :: Create your first class
OOP is a blessing to modern programmming languages. It helps you to
reuse your code and shorten the time of development. Reusable objects
(ie. Classes) enables RAD (Rapid Application Development) environment
for you. PHP4 also support OOP. But it becomes mature in PHP5.
Here is a sample for PHP4 to create class and use it.
//a sample method in this class
//now use this class
$wd = new world(); //create and instance of our world class
$wd->speak("Hello World"); //This will print "Hello World"
In PHP5, classes supports all OOP features like Inheritence,