PHP Test online
12. Choose the appropriate function declaration for the user-defined function is_leap(). Assume that, if not otherwise defined, the is_leap function uses the year 2000 as a default value:Вариант ответа 1 - A) function is_leap($year = 2000) Вариант ответа 2 - B) is_leap($year default 2000) Вариант ответа 3 - C) function is_leap($year default 2000) Вариант ответа 4 - D) function is_leap($year) Вариант ответа 5 - E) function is_leap(2000 = $year) Comments: Of the five options, only two are valid PHP function declarations (A and D). Of these two declarations, only one will provide a default parameter if none is passed—Answer A. |
Comments
| User name | Comment |
|---|
Русский