Hi,

On Thu, 29 Oct 2020, Dmitry Stogov wrote:

> On Thu, Oct 29, 2020 at 2:18 PM Derick Rethans <der...@php.net> wrote:
> 
> > what is the reason for this change? It breaks some introspection 
> > code that I am working on that expects the http_response_header 
> > variable to always be set for stream wrappers, even if it's not used 
> > in code.
> 
> $http_response_heade makes a lot of troubles for optimization, JIT and 
> performance. It's already proposed to deprecate it in 8.1
> 
> I changed the behavior, because I just found a problem that can't be 
> fixed without performance loss. The current JIT implementation would 
> just leak memory if $http_response_header is not used but magically 
> created. We discussed this with Nikita and decided to be practical and 
> don't populate $http_response_header if it's not used in function 
> scope.
> 
> If EX(symbol_table) already exists, $http_response_header is going to 
> be created as before. If you show your code, I might try to find a 
> workaround for you.

Nikita already suggested a workaround, which is to read the stream meta 
data (through stream->wrapperdata) directly, which also seems like a 
much cleaner solution to me, and it works (even with PHP 5.3 :-) ).

cheers,
Derick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to