<?php
error_reporting(-1);
@ini_set('display_errors', 'On');
@ini_set('display_startup_errors', 'On');
$noCDATA = <<<XML
<?xml version='1.0'?>
<message>
It fails with special characters, like "CoÒ  ¶peratiehof 16a".
</message>
XML;
$yesCDATA = <<<XML
<?xml version='1.0'?>
<message><![CDATA[
It fails with special characters, like "CoÒ  ¶peratiehof 16a". Hence we need to wrap it.
]]></message>
XML;
$xml = simplexml_load_string($yesCDATA);
print_r((string) $xml);
$xml = simplexml_load_string($noCDATA);
print_r((string) $xml);
It fails with special characters, like "CoÒ  ¶peratiehof 16a". Hence we need to wrap it.
Warning: simplexml_load_string(): Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 25 in /in/6f0vA on line 23
Warning: simplexml_load_string(): It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 23
Warning: simplexml_load_string(): ^ in /in/6f0vA on line 23
Warning: simplexml_load_string(): Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 26 in /in/6f0vA on line 23
Warning: simplexml_load_string(): It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 23
Warning: simplexml_load_string(): ^ in /in/6f0vA on line 23
Output for 7.1.10
Process exited with code 137.
Output for 5.1.2
It fails with special characters, like "CoÒ  ¶peratiehof 16a". Hence we need to wrap it.
Warning: simplexml_load_string(): Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 25 in /in/6f0vA on line 25
Warning: simplexml_load_string(): It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 25
Warning: simplexml_load_string(): ^ in /in/6f0vA on line 25
Warning: simplexml_load_string(): Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 26 in /in/6f0vA on line 25
Warning: simplexml_load_string(): It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 25
Warning: simplexml_load_string(): ^ in /in/6f0vA on line 25
Output for 5.0.0 - 5.0.5
It fails with special characters, like "CoÒ  ¶peratiehof 16a". Hence we need to wrap it.
Warning: Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 25 in /in/6f0vA on line 23
Warning: It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 23
Warning: ^ in /in/6f0vA on line 23
Warning: Entity: line 3: parser error : xmlParseCharRef: invalid xmlChar value 26 in /in/6f0vA on line 23
Warning: It fails with special characters, like "CoÒ  ¶peratiehof 16a". in /in/6f0vA on line 23
Warning: ^ in /in/6f0vA on line 23
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/6f0vA on line 20
Process exited with code 255.