OO_002.phpt 464 B

12345678910111213141516171819202122
  1. --TEST--
  2. XMLWriter: libxml2 XML Writer, membuffer, flush
  3. --SKIPIF--
  4. <?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
  5. --FILE--
  6. <?php
  7. /* $Id$ */
  8. $xw = new XMLWriter();
  9. $xw->openMemory();
  10. $xw->startDocument('1.0', 'UTF-8', 'standalone');
  11. $xw->startElement("tag1");
  12. $xw->endDocument();
  13. // Force to write and empty the buffer
  14. echo $xw->flush(true);
  15. ?>
  16. ===DONE===
  17. --EXPECT--
  18. <?xml version="1.0" encoding="UTF-8" standalone="standalone"?>
  19. <tag1/>
  20. ===DONE===