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