Req #63506 [Opn->Csd]: Adding openStream() method to XMLWriter

From: Date: Sat, 29 Jun 2024 16:08:32 +0000
Subject: Req #63506 [Opn->Csd]: Adding openStream() method to XMLWriter
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247183@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63506&edit=1 ID: 63506 Updated by: nielsdos@php.net Reported by: evert at rooftopsolutions dot nl Summary: Adding openStream() method to XMLWriter -Status: Open +Status: Closed Type: Feature/Change Request Package: XML Writer PHP Version: Irrelevant -Assigned To: +Assigned To: nielsdos Block user comment: N Private report: N New Comment: The fix for this bug has been committed. If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2024-06-29 16:08:26] nielsdos@php.net This is implemented in PHP-8.4-dev (as toStream()). ------------------------------------------------------------------------ [2012-11-13 18:26:55] evert at rooftopsolutions dot nl Description: ------------ It would be extremely handy if, instead of supplying XMLWriter with a uri, we can give it a writeable stream instead, as such; $h = fopen('php://output','w'); $xw = new \XMLWriter(); $xw->openStream($h); This way the XMLWriter does not have to be aware of an output uri. In my applications (webservices) I simply work with out an output, and an input stream. Different components write to the outputstream, and what they are writing comes from different sources. Unittests often simply replace the outputstream with php://memory, or php://temp, so the application output can get easily redirected. Using openUri() I have to break this, which would kind of suck. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63506&edit=1

« previous php.bugs (#247183) next »