Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Object-Oriented PHP Basics (Retired) Inheritance, Interfaces, and Exceptions Inheritance to Interfaces

fill in the blank quiz about object interfaces

First question is You use the keyword_______________ to use an interface on an class. I typed the answer was interface it was wrong answer. I found the info http://us2.php.net/manual/en/language.oop5.interfaces.php

second question is You will use the keyword ___________ to apply inheritance from a parent to a child class. the other site is http://us2.php.net/manual/en/language.oop5.inheritance.php I could not get the correct answer i was stuck for a while. please help thanks.

3 Answers

Winnie E Tibingana
Winnie E Tibingana
21,066 Points

Hi Brian, You use the keyword extends to apply inheritance ... Please read this: http://php.net/manual/en/language.oop5.inheritance.php

You use the keyword implements to use an interface on an class please read this: http://php.net/manual/en/language.oop5.interfaces.php

Hope that helps.

Abdirahman Shire
Abdirahman Shire
12,987 Points

Put implements after the class. You can the answer if you read this http://us2.php.net/manual/en/language.oop5.interfaces.php

Abdirahman Shire
Abdirahman Shire
12,987 Points

I mean ...Put implements after the class. You would get the answer if you read this link http://us2.php.net/manual/en/language.oop5.interfaces.php Hope that helps.