Welcome to the Treehouse Community
Looking to learn something new?
Darryl Amatsetam6,141 Points
Why is my answer incorrect
I come from Java. When I'm answering a question related to this quiz regarding the definition of variables in an object, the answer 'field' is considered incorrect. Why is that?
Kazimierz Matan13,257 Points
Property and field is not exactly the same.
Although Wikipedia is not always a reliable source of information, but in this case it can be useful: "A property, in some object-oriented programming languages, is a special sort of class member, intermediate between a field (or data member) and a method. Properties are read and written like fields, but property reads and writes are (usually) translated to get and set method calls."
PHP official documentation also prefers properties: Class member variables are called "properties". You may also see them referred to using other terms such as "attributes" or "fields", but for the purposes of this reference we will use "properties".