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 Building a Collection Final Quiz

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.