Type hinting in PHP allows the identification of the following variable types: (Choose 2)

Type hinting in PHP allows the identification of the following variable types: (Choose 2)
A . String
B . Integer
C . Array
D . Any class or interface type
E . All of the above

Answer: C, D

Subscribe
Notify of
guest
2 Comments
Inline Feedbacks
View all comments
serg
serg
3 years ago

PHP 7 is support scalar type hinting.
PHP 5 is not.

This question is kinda weird because of misunderstanding particular version of PHP that means.

serg
serg
3 years ago

Wrong.

Type hinting allows int and string too.
So the right answer is E