Explanation: Answer options C and B are correct.
In PHP 5, type hinting is a feature due to which functions can specify what type of parameters must be provided to the functions. If that parameter is not of the correct type, the PHP script will give an error. Type hinting is not supported for strings and integers. Type hinting can also help in code completion in an IDE. For example, consider the following PHP script:
- function foo(string $foo) {
- }
- foo('somestring');
It will result the following error:
- Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given, called in . ..
Answer options C and B are incorrect. Object and array datatypes are supported by type hinting.
Reference: http://php.net/manual/en/language.oop5.typehinting.php