I am trying to develop xml/xsl based UI in my product. Each php request will use PHP Extensions to generate XML and transform it to HTML. As HTML is generated by the PHP extension, it will be buffered and returned as string to PHP. Instead of buffering HTML, I wanted to write HTML directly to response stream from PHP Extension. How can I get response stream handler in PHP Extension. Or is there any way to avoid buffering of HTML in PHP Extension?