|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-07-10 01:44 UTC] jim dot michaels at Jesusnjim dot com
  [2016-07-11 03:38 UTC] anrdaemon at freemail dot ru
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 04:00:01 2025 UTC | 
Description: ------------ The attached short demonstration is only a tip of iceberg. I'll submit one more bug in this area shortly. Test script: --------------- <?php $indent = ''; $parser = xml_parser_create_ns('UTF-8'); xml_set_element_handler($parser, function($self, $name, $attributes){ global $indent; print "{$indent}{$name} " . json_encode($attributes, 832) . "\n"; $indent .= "\t"; }, function($self, $name){ global $indent; $indent = substr($indent, 0, -1); print "{$indent}/{$name}\n"; }); xml_set_character_data_handler($parser, function($self, $data){ global $indent; if($text = trim($data)) print "{$indent}#text: {$text}\n"; }); xml_parse($parser, '<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE x [ <!ENTITY pic PUBLIC "image.gif" "http://example.org/image.gif"> ]> <p>&pic;</p>', true); // Expecting at least 'Undeclared entity error' (entity was declared for a different root tag). print xml_error_string(xml_get_error_code($parser)) . "\n"; ?> Expected result: ---------------- I would expect "Undeclared entity error" at the very least. Optimally "Mismatched tag" (wrong root tag). Actual result: -------------- "No error".