OO_001.phpt 502 B

1234567891011121314151617181920212223
  1. --TEST--
  2. XMLWriter: libxml2 XML Writer, file buffer, flush
  3. --EXTENSIONS--
  4. xmlwriter
  5. --FILE--
  6. <?php
  7. $doc_dest = 'OO_001.xml';
  8. $xw = new XMLWriter();
  9. $xw->openUri($doc_dest);
  10. $xw->startDocument('1.0', 'UTF-8', 'standalonearg');
  11. $xw->startElement("tag1");
  12. $xw->endDocument();
  13. // Force to write and empty the buffer
  14. $output_bytes = $xw->flush(true);
  15. echo file_get_contents($doc_dest);
  16. unset($xw);
  17. unlink($doc_dest);
  18. ?>
  19. --EXPECT--
  20. <?xml version="1.0" encoding="UTF-8" standalone="standalonearg"?>
  21. <tag1/>