xref: /PHP-8.0/ext/xmlwriter/tests/OO_002.phpt (revision a555cc0b)
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--EXPECT--
18<?xml version="1.0" encoding="UTF-8" standalone="standalone"?>
19<tag1/>
20