1.

Type Hinting was introduced in which version of PHP?(a) PHP 4(b) PHP 5(c) PHP 5.3(d) PHP 6I had been asked this question in final exam.This intriguing question comes from Functions in chapter Arrays and Functions of PHP

Answer»

Correct OPTION is (b) PHP 5

The best I can explain: PHP 5 introduced the feature of type hinting. With the HELP of type hinting, we can specify the EXPECTED data type of an argument in a function DECLARATION. First valid types can be the class names for arguments that receive objects and the other are array for those that receive arrays.



Discussion

No Comment Found

Related InterviewSolutions