Zend
ZF-100-500 · Question #149
What will be the output of the following PHP script? <?php include("xml.inc"); if (!$dom = domxml_open_mem($xmlstr)) { echo "Error while parsing the XML document \n"; exit; } $a =…
The correct answer is A. It will display the root element of the XML f ile. See the full explanation below for the reasoning.
Question
What will be the output of the following PHP script? <?php include("xml.inc"); if (!$dom = domxml_open_mem($xmlstr)) { echo "Error while parsing the XML document \n"; exit; } $a = $dom->document_element(); print_r($a); ?>
Options
- AIt will display the root element of the XML f ile.
- BIt will display the XML code of the XML file.
- CIt will throw an error.
- DIt will display the contents of the XML file.
How the community answered
(41 responses)- A80% (33)
- B12% (5)
- C2% (1)
- D5% (2)
Community Discussion
No community discussion yet for this question.