Custom Search

OOPS in PHP 5 - __construct() Method

Constructor in OOP Language are special function that gets fired whenever object of a class is instantiated. This is useful for initializing class data members before calling the class methods. PHP5 uses special keyword “__construct” to define constructor of the class.

Bookmark It

Hide Sites

OOPS in PHP 5 - Define Methods for the Class

Now once you have declared class and all its data members now will have to declare all the methods that the class will use. This tutorial will guide you to create methods for class.
What are Methods in Class?
Methods defines the functionality for the class. Methods acts on the data and communicate with each other by [...]

OOPS in PHP 5 - Define Attributes for Class

Now you have declared class and now we have to define the attributes or the data member that will hold the data within the class. This tutorial will guide you to create attributes for the class.
What are Attributes for Class?
In OOPS attributes hold the data required for the class to perform its functionality. By declaring [...]

OOPS in PHP 5 - Declaring Class and Initializing Class Object

In Object Oriented Programming Classes is the main entity and all other features of OOP work around the Classes. In this tutorial we will be discussing on declaring class in PHP5. Also covered on how to instantiate the class object.
Declaring Class in PHP5:
In PHP5 you create a new class using “class” keyword.

Bookmark It

Hide Sites