HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/test/XML_Serializer/tests/bug-12139.phpt
--TEST--
XML Serializer - test for Bug #12139:  XML_Parser read '#' in data as Invalid document end
--FILE--
<?php
require_once 'XML/Unserializer.php';

$xml = <<<EOF
<stdClass>
  <foo>Some text with #sign in it</foo>
</stdClass>
EOF;

$unserializer = &new XML_Unserializer();
$status = $unserializer->unserialize($xml);
if (PEAR::isError($status)) {
    echo $status->getMessage();
}
$plan = $unserializer->getUnserializedData();
var_dump($plan);
?>
--EXPECT--
array(1) {
  ["foo"]=>
  string(26) "Some text with #sign in it"
}