ID: 41071 Updated by: [EMAIL PROTECTED] Reported By: php at primezero dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: IRRELEVANT PHP Version: Irrelevant New Comment:
Nice catch, fixed. Previous Comments: ------------------------------------------------------------------------ [2007-04-13 00:18:32] php at primezero dot com Description: ------------ On the following web page: http://us.php.net/manual/en/function.simplexml-load-file.php Correction required for "Example 2158. Interpret an XML document." Instead of var_dump() it should print_r() since the datatypes are not displayed in the example shown. Reproduce code: --------------- <?php // The file test.xml contains an XML document with a root element // and at least an element /[root]/title. if (file_exists('test.xml')) { $xml = simplexml_load_file('test.xml'); var_dump($xml); ### <---- BZZZZZZ HERE'S THE MINOR BOO BOO } else { exit('Failed to open test.xml.'); } ?> Expected result: ---------------- object(SimpleXMLElement)#1 (1) <-- with var_dump() Actual result: -------------- SimpleXMLElement Object <--- with print_r() ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41071&edit=1