Understanding Interface in Object Oriented PHP (Published in tisuchi.com)

You may heard about Interface in Object Oriented PHP Programming. But have you ever asked yourself that, what exactly interface? How it work? Or what is the functionality? As a php developer, why you have to bother about it?


Well, if you have that kinds of questions in you mind, you may be lucky that this tutorial is for you. This writing is totally dedicated to understand Interface in OO PHP. What exactly interface do? Lets see…


What is Interface?

An interface is a contract between unrelated objects to perform a common function. Literally it guarantor for users to ensure that it is capable to perform all the functions of object that is defined specification. For example, cricket bat and football are totally different things in terms of shape and size, but in object representing those items in a sporting goods store inventory must be capable of interacting with that system.

It is very important to understand that, by declaring an interface and then implementing it in objects, can be hand completely different classed to common functions.


To know more, visit http://tisuchi.com/understanding-interface-object-oriented-php/