PHP

Scalar type declaration basics in Php

Jan 05 2019 0 by admin

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.

Posted on

Php trait in Oops

Jan 05 2019 0 by admin

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.

Posted on

Php encapsulation basics

Jan 05 2019 0 by admin

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

Posted on

Interface basics php oops

Jan 05 2019 0 by admin

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.

Posted on

Static variables and methods

Jan 05 2019 0 by admin

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

Posted on

Php Abstract Class

Jan 05 2019 0 by admin

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.

Posted on

Destructor basics in php

Jan 05 2019 0 by admin

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

Posted on

Constructor basics PHP oops

Jan 05 2019 0 by admin

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.

Posted on

Class and Object basics PHP Oops

Nov 23 2018 0 by admin

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

Posted on

Loops basics in PHP

Sep 05 2017 0 by admin

While | Do While | For | Foreach | Loop in php is used to execute until provided expression is true.

In PHP, four type of loop available.

1. WHILE Loop

2. DO WHILE Loop

3. FOR Loop

4. FOREACH Loop

Posted on

Php If else basics

Sep 05 2017 0 by admin

if else statements are very basic blocks to check condition(boolean expression) to execute appropriate block.

IF ELSE STATEMENTS :

SYNTAX:

if (booleanExpression) {
// if booleanExpression is True this code will execute
your code here….
} else {
// if booleanExpression is False this code will execute
your code here….
}

Posted on

Array Basics - PHP Example

Aug 29 2017 0 by admin

Array is a collection of similar types of datatype.
Array is used to stores multiple values in one place.
Array contains key => value pair, each value in array assigned on a key (index).
We can fetch stored value with the use of key (index).

Posted on