1--TEST-- 2Dom\XMLDocument::createFromString 04 3--EXTENSIONS-- 4dom 5--SKIPIF-- 6<?php 7if (getenv('SKIP_ASAN') && LIBXML_VERSION < 20911) die('xleak leaks under libxml2 versions older than 2.9.11'); 8?> 9--FILE-- 10<?php 11 12$dom = Dom\XMLDocument::createFromString('<?xml version="1.0" encoding="Windows-1251"?><container/>'); 13var_dump($dom->charset); 14echo $dom->saveXml(); 15 16?> 17--EXPECT-- 18string(12) "Windows-1251" 19<?xml version="1.0" encoding="Windows-1251"?> 20<container/> 21