Hi Gina, I would like to propose an RFC to add the functions > http_get_last_request_headers() and http_clear_last_request_headers() to > PHP to replace the magic variable $http_response_header. > > Link: https://wiki.php.net/rfc/http-last-response-headers >
Sorry I missed this RFC. In Symfony's HttpClient, we use stream_get_meta_data($h)['wrapper_data'] to access headers, so there is already a way to get them using nothing but local scope. This makes me wonder why, in "rejected ideas", you wrote this? > One suggested idea was to provide those headers via a by-reference entry > to the stream context. Maybe we don't need anything but to promote what works already (this "wrapper_data" entry)? Nicolas