On Fri, Jul 1, 2011 at 10:18, David Zülke <david.zue...@bitextender.com> wrote: > On 01.07.2011, at 01:29, Stas Malyshev wrote: > >> Hi! >> >> On 6/30/11 2:34 PM, Michael Maclean wrote: >>> The same data also ends up in the bizarre $http_response_headers var >>> that gets spontaneously created in local scope - I've wondered about how >>> good that is to do. >> >> This thing is indeed bizzare. I wonder if anybody uses it and why it was >> done this way... > > I've used it before... IIRC, it was because that var gets set on older PHP > versions even if the HTTP response is an error (in which case the stream is > destroyed and you can't get the metadata anymore either; newer versions have > the "ignore_errors" context option for that). >
I use it extensively. Its nearly the only way to get the headers from file_get_contents() for example. -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php