xref: /PHP-8.3/ext/xmlwriter/tests/OO_002.phpt (revision 74859783)
1--TEST--
2XMLWriter: libxml2 XML Writer, membuffer, flush
3--EXTENSIONS--
4xmlwriter
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