As it says on this page:
"The stream allows access to the body of the resource; the headers are stored in the $http_response_header variable. Since PHP 4.3.0, the headers are available using stream_get_meta_data()."
This one sentence is the only documentation I have found on the mysterious $http_response_header variable, and I'm afraid it's misleading. It implies that from 4.3.0 onward, stream_get_meta_data() ought to be used in favor of $http_response_header.
Don't be fooled! stream_get_meta_data() requires a stream reference, which makes it ONLY useful with fopen() and related functions. However, $http_response_header can be used to get the headers from the much simpler file_get_contents() and related functions, which makes it still very useful in 5.x.
Also note that even when file_get_contents() and friends fail due to a 4xx or 5xx error and return false, the headers are still available in $http_response_header.