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) Properties and Methods Properties

Child classes are just out of luck?

What does he mean by, "child classes are just out of luck"?

2 Answers

Randy Perez
Randy Perez
5,668 Points

As he mentioned in that video don't get worried about inheritance just yet and child classes is a term of that subject.

But to let you know when a class inherits(child) from an other class(parent) it becomes a child class of the original parent class. The protected and public method and variables are available for that child class but the private ones are not. That's what he is trying to state

Hope this helps.

I still don't understand the sentence, "the child classes are just out of luck" but what you wrote does make sense. I just don't understand what is created out of luck? The child classes are created unintentionally whenever you create a parent? I just don't understand what he is saying, but i guess it really doesn't matter.