Post image for Trait in PHP 5.4

Trait in PHP 5.4

What is trait? Trait is the new concept introduced in PHP 5.4. Which likes to remove the limitation of the multiple inheritance in single inheritance language PHP. Before PHP 5.4, PHP support single inheritance and multiple interface but trait is going to remove the limitation of not having multiple inheritance. Why Use trait? The main […]

Post image for Object Cloning in PHP

Object Cloning in PHP

Object cloning is just like create an exact copy of an object from one object. Cloning of an object is done using the keyword . So when you try to clone the object then it will call the __clone() method of the class if possible. We can not call directly from any object. How to […]

Post image for Static Keyword in PHP

Static Keyword in PHP

Static methos allow us to call the method of the class without creating an object of the class. So in that case we have to use scope resolution operator to call the static methods. Declare Method as Static: Static methods can be declared using keyword . Have look at below code bloc for the same: […]

Post image for Interface in PHP

Interface in PHP

Brief About Interface Most of the design patterns use interfaces, but interfaces are no design pattern. So from the programming point of view it will not add any additional functionality to your code but it will help up to make some standards for the code you have written. Interface is some what like as abstract […]

Post image for Abstract in PHP

Abstract in PHP

For Abstact keyword we can say that, abstract is type of the class and class which we can’t create a object of it. Surprised???? Yes, you have read it correctly. We can not create object of the abstract class using keyword. Also we can not call the abstract methods directly as we can’t create a […]

Post image for PHP Error Handling

PHP Error Handling

PHP has set of functions which can deal with the handling the errors generated during the program execution. As a good programming practice it is good to use the Error Handling function which let developer to handle the error in any way they want.

Post image for MySQL Table Overhead

MySQL Table Overhead

If you are familier with the PhpMyAdmin then you might have seen the column overhead in the table listing page. So what is this table overhead? So I am trying to explain this in very simple way as much I can: Whenever you delete rows from the MySQL tables, it creates a unoccupied space in […]

Post image for Mysql Query State

Mysql Query State

Whenever you perform your query on MySQL database, MySQL Server will pass that query from the diffrent states. There are around 65 query states available. I am going show few most used states over here. If you are using PHPMyAdmin then you will not able to see these states. You will need to use the […]