public function hasFeature(string $feature, string $version) {}
/** @return DOMDocumentType|false */
- public function createDocumentType($qualifiedName, $publicId, $systemId) {}
+ public function createDocumentType(
+ string $qualifiedName, string $publicId = "", string $systemId = "") {}
/** @return DOMDocument|false */
public function createDocument(string $namespaceURI = "", string $qualifiedName = "", DOMDocumentType $doctype = UNKNOWN) {}
#define arginfo_class_DOMImplementation_hasFeature arginfo_class_DOMNode_isSupported
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0, 3)
- ZEND_ARG_INFO(0, qualifiedName)
- ZEND_ARG_INFO(0, publicId)
- ZEND_ARG_INFO(0, systemId)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocument, 0, 0, 0)
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd");
$doc = $imp->createDocument(null, 'html', $doctype);
echo $doc->saveHTML();
+
+$doctype = $imp->createDocumentType("html");
+$doc = $imp->createDocument(null, 'html', $doctype);
+echo $doc->saveHTML();
+
+$doctype = $imp->createDocumentType("html", "", "");
+$doc = $imp->createDocument(null, 'html', $doctype);
+echo $doc->saveHTML();
+
?>
--EXPECT--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html></html>
+<!DOCTYPE html>
+<html></html>
+<!DOCTYPE html>
+<html></html>