Re: $http_response_header

From: Date: Fri, 27 Mar 2015 16:50:38 +0000
Subject: Re: $http_response_header
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-85511@lists.php.net to get a copy of this message
On Fri, Mar 27, 2015 at 5:42 PM, Ralph Schindler <ralph@ralphschindler.com> wrote: > > About $php_errormsg , we have error_get_last(). >>>> About $http_response_headers, we have no replacement. >>>> >>>> Why not get rid of both ? >>>> >>> >>> I agree. Magically appearing variables are bad design and if we can get >>> rid of them, PHP 7 is the time. >>> >>> -- >>> Stas Malyshev >>> smalyshev@gmail.com >>> >>> >> did we miss the opportunity? >> > > Maybe so. Truthfully, I came to the conclusion I did not want to propose > removing $http_response_header unless we had a reasonable replacement for > the somewhat common workflow of > file_get_contents('http://...'); then > usage of $http_response_header. > > I think there might be room to have added http_get_last_header(), or > something to that effect. > > yeah, but we already mentioned/discussed this that the removal would require introducing another way (eg. adding a method) for fetching the headers. I think that introducing this method can happen in a minor version(without removing the $http_response_header variable), so I will create a pull request and ask Julien about including it in 5.5 and upwards. -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#85511) next »