int name_len, content_len, retval;
/* Optional parameters */
char *pubid = NULL, *sysid = NULL, *ndataid = NULL;
- int pe = 0, pubid_len, sysid_len, ndataid_len;
+ zend_bool pe = 0;
+ int pubid_len, sysid_len, ndataid_len;
#ifdef ZEND_ENGINE_2
zval *this = getThis();
if (this) {
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&|ls&s&s&",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&s&|bs&s&s&",
&name, &name_len, UG(utf8_conv), &content, &content_len, UG(utf8_conv),
&pe, &pubid, &pubid_len, UG(utf8_conv), &sysid, &sysid_len, UG(utf8_conv),
&ndataid, &ndataid_len, UG(utf8_conv)) == FAILURE) {
} else
#endif
{
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs&s&|ls&s&s&", &pind,
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs&s&|bs&s&s&", &pind,
&name, &name_len, UG(utf8_conv), &content, &content_len, UG(utf8_conv),
&pe, &pubid, &pubid_len, UG(utf8_conv), &sysid, &sysid_len, UG(utf8_conv),
&ndataid, &ndataid_len, UG(utf8_conv)) == FAILURE) {
xmlwriter_start_element($xw, "root");
xmlwriter_end_document($xw);
print xmlwriter_flush($xw, true);
+print "\n";
+
+$xw = new XMLWriter();
+$xw->openMemory();
+$xw->startDocument(NULL, "UTF-8");
+$xw->startDtd("root");
+$xw->writeDtdEntity("c", NULL, 0, "-//W3C//TEXT copyright//EN", "http://www.w3.org/xmlspec/copyright.xml");
+$xw->endDtd();
+$xw->startElement("root");
+$xw->endDocument();
+print $xw->flush(true);
?>
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [<!ENTITY ent2 "val2">]><root/>
+
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE root [<!ENTITY c PUBLIC "-//W3C//TEXT copyright//EN" "http://www.w3.org/xmlspec/copyright.xml">]><root/>