mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
23 lines
464 B
PHP
23 lines
464 B
PHP
--TEST--
|
|
XMLWriter: libxml2 XML Writer, membuffer, flush
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
/* $Id$ */
|
|
|
|
$xw = new XMLWriter();
|
|
$xw->openMemory();
|
|
$xw->startDocument('1.0', 'UTF-8', 'standalone');
|
|
$xw->startElement("tag1");
|
|
$xw->endDocument();
|
|
|
|
// Force to write and empty the buffer
|
|
echo $xw->flush(true);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
<?xml version="1.0" encoding="UTF-8" standalone="standalone"?>
|
|
<tag1/>
|
|
===DONE===
|