Le mardi 18 février 2020, 07:33:37 CET Paul M. Jones a écrit :
> ... the output would be "b\n". As you say, setContent() replaces whatever 
> content is already in the ServerResponse. While the comparison for a single 
> echo is accurate, the comparison for multiple echoes would be:
> 
>     $content = "a\n";
>     $content .= "b\n";
>     $response->setContent($content);
>     $responseSender->send($content);
> 
> Does that help to clarify?

Yes, but to me that means we also need an addContent method.
Otherwise people will have to carry a global $content along side $response, or 
use setContent(getContent().$additionalContent).

-- 
Côme Chilliet
FusionDirectory - https://www.fusiondirectory.org

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

Reply via email to