Zend
200-530 · Question #149
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
The correct answer is D. get_headers($url, 1). See the full explanation below for the reasoning.
Question
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
Options
- Aget_headers($url);
- Bget_header($url);
- Cstream_context_get_headers($url);
- Dget_headers($url, 1);
- Eget_headers($url, ASSOC_HEADERS);
How the community answered
(34 responses)- A3% (1)
- B15% (5)
- C3% (1)
- D71% (24)
- E9% (3)
Community Discussion
No community discussion yet for this question.