Which characters is used to access property variables on an object-by-object basis?
Correct answer
C. ->
16 views
C. ->
16 views
The object operator -> is used to access the properties and methods of a specific object, as in $product->title.
The scope resolution operator :: is used instead for static members and class constants, the dot is for string concatenation, and = is assignment. Mixing up -> and :: is one of the most common beginner mistakes in PHP OOP.
For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.