PHP Test online


16. Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?


Вариант ответа 1 - A) When the parameter is Boolean

Вариант ответа 2 - B) When the function is being declared as a member of a class

Вариант ответа 3 - C) When the parameter is being declared as passed by reference

Вариант ответа 4 - D) When the function contains only one parameter

Вариант ответа 5 - E) Never


Comments: When a parameter is declared as being passed by reference you cannot specify a default value for it, since the interpreter will expect a variable that can be modified from within the function itself.

Comments

User nameComment
User name
Comment text
Code