Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Object-Oriented PHP Basics Building a Collection Final Quiz

John Krische
John Krische
813 Points

A quiz question at the very end of the "Object-Oriented PHP Basics" track has, IMHO, a bad question.

In the "final quiz" of the Object-Oriented PHP Basics track, one of the possible questions I got asked was: which magic METHOD was the best one for getting to a file in the same directory as the current file. However, IIRC, such things are not magic METHODS, but magic CONSTANTS. This miswording threw me off because none of the provided multi-choice answers were methods (functions), all were constants (properties/attributes) -- _ _ FILE _ _, _ _ DIR _ _, etc.

I got the wrong answer anyway after figuring out the miswording, but thought I should point it out for a possible revision. It may not seem like much, but as y'all well know, using the wrong word in programming can yield bad results. By calling it a method, I imply that it's something I do to or with a thing (a function), rather than something innate ABOUT a thing, ie, a property or attribute, which fall under the category of magic constants -- and the location of a file is definitely an attribute, not an action.