Why use interfaces in PHP (OOP)


Posted on 16th Feb 2014 07:03 pm by admin

I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't understand at all is interfaces. I understand the implications of multiple inheritance, and interface is used just to solve that. But what's the use?
If we have to define the function in derived class why use interface, why not directly declare and define it inside the derived class?
Did you know?Explore Trending and Topic pages for more stories like this.
Am I missing something or is it really useless?
No comments posted yet

Your Answer:

Login to answer
79 Like 36 Dislike
Previous forums Next forums
Other forums

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

DBCA Templates
Hi all,

I'm working on creating a template for DBCA, but can't find any documentation on the

Undefined Index Notice In Internet Explorer Only
I am getting the following notice:

QuoteNotice: Undefined index: jrox in /home/ycsn/public_h

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

php code generators
All

Whilst enjoying learning a new language i have come accross a number of free code generat

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash