Closed L1Q closed 1 week ago
On my computer, on global scope any variable seems not to be marked as unknown. I thought i've just had some setting wrong that I did not know about;
In the next release the type of $http_response_header
will be changed to unset|array
. There's no plans to try and accurately determine when this variable becomes defined as it looks like it may be removed in future versions of PHP.
https://wiki.php.net/rfc/http-last-response-headers
Predefined variable $http_response_header is only autopopulated in local scope where HTTP wrapper was used, e.g. after
file_get_contents
.Intelephese incorrectly reports
$http_response_header
as always defined in any scope, regardless of HTTP wrapper usage earlier in local scope.Code from php.net:
Here, only the first
$http_response_header
should be reported as defined, but both are.