Website Templates Search

Oops

In Php, Scalar Type Declarations two different types options :

1. Coercive mode : coercive mode is a default mode and need not to be specified.

2. Strict mode : Strict mode need to be explicitly type hinted....

In Php trait is a new concept which is introduced to achieved multiple inheritance.

trait are created using trait keyword followed by the name of trait.

you can define variables, methods,abstract methods in trait, you can define everything that you defined within a class definition....

Wrapping up Data Member and Member Function in a single unit is known as encapsulation....

An interface is a common structure which multiple class can implement. By using interface we can restrict classes to implement functions which are inside interface....

In this example we are showing how we can declare and use static variables and functions inside any class....

A class which is defined with abstract keyword followed by class name is Known as Abstract class.

If a class has at-least one abstract method then it becomes abstract class....

A destructor is a special member function in the class. It is used to de-allocate memory for an object created by the constructor....

In Php, Constructor is a special member function which is created by the __construct() keyword.

__construct() is automatically called when we create instance of the class.

__construct() is a “MagicMethod used to define a Constructor.

The first method of any class is Constructor method....

In PHP object oriented programming, a class can be created by using class keyword followed by the name of the class....