There's a small gap of proper support here:
1) the get_headers() function would give the Location header (since it uses STREAM_ONLY_GET_HEADERS) if the max_redirects is set to 1, but it doesn't return a response body
2) the current fopen wrapper function only returns the headers (inside the wrapper data) in the absence of a Location header
I was exploring to use php streams as an extension to the oauth project so that the curl dependency could be made optional, but this would require me to copy & paste a lot of logic from php_stream_url_wrap_http_ex() =(

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.