Both 'self' and 'this' are keywords that can be used to refer to member variables of an enclosing class. The difference is that '$this->member' should be used for ' members and 'self::$member' should be used for ' members.

🎲 Try a Random Question  |  Total Questions in Quiz: 81  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
PHP Test — practice the complete quiz, review flashcards, or try a random question.

PHP MCQs For LinkedIn Skill Assessments.


Both 'self' and 'this' are keywords that can be used to refer to member variables of an enclosing class. The difference is that '$this->member' should be used for ' members and 'self::$member' should be used for ' members.