Friday, 4 April 2014

PHP

Object Orientation In PHP

The purpose of this section is to introduce the basic concepts of object orientation. What does it actually
mean to say, “PHP is object oriented?” The simplest answer is that PHP allows for the definition and
hierarchical organization of user data types. This book is about PHP 5.3, which introduced some new
elements to PHP object apparatus. PHP underwent a fairly radical change since the version 4, which also
included rudimentary object-oriented (OO) capabilities. In PHP 4, for instance, it wasn’t possible to
define visibility of methods and members. In PHP 5.3, namespaces were added.
In this chapter we will introduce the ideas of classes, inheritance, object creation, and interface
definition. We will also introduce some less elementary stuff, like iterators. So, let’s get started.
Classes