Vidyalelo
PHP · Q1

Object Oriented Concept

Programming · PHP · question 1

Q1

Which one of the following is not a valid class name?

A.
ShopProduct
B.
Shopproduct
C.
Shopproduct1
D.
1shopproduct
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
You declare a class with the class keyword and an arbitrary class name. Class names can be any combination of numbers and letters, although they must not begin with a number.