Vidyalelo
PHP · Q20

Object Oriented Concept

Programming · PHP · question 20

Q20

Which one of the following variable cannot be used inside a static method?

A.
$this
Answer
B.
$get
C.
$set
D.
$date

Answer: Option A

Solution

Answer: Option A
Solution:
By definition, static methods are not invoked in the context of an object. For this reason, static methods and properties are often referred to as class variables and properties.