Introduction to classes and objects in PHP

In general object oriented model (OOM) allows better parsing (or compiling) performance and more features. In PHP, once an object is created, a variable makes a reference t...

Magic methods in PHP classes

The PHP reserves some functions which can be called when needed in within a class. These predefined functions are called m...

Class constants in PHP

In PHP an unchangeable or constant value can be created by using a basic PHP class. That constant will be different than a normal variable because it does not initialize with

Class constructor and destructor in PHP

Constructors Similar to JavaScript Constructo...

Object inheritance in PHP

The inheritance provides a relation between classes, parents and children. The...

Scope resolution operator in PHP (::)

The Scope resolution operator (::) allows access to static, constant properties or methods of a class. When referring to a class outside the class definition, we must use clas...

Object serialization in PHP (serialize ())

The function serialize () returns a string containing a byte-stream representation of any value that can be stored in PHP. Using serialize to save an object will save all variables...

Predefined interfaces and classes in PHP

PHP has many predefined interfaces and classes that may be used in object model programming. The list below goes through some of them offering a breif explanation of their usage.