nerdexam
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)
  • A
    80% (33)
  • B
    12% (5)
  • C
    2% (1)
  • D
    5% (2)

Community Discussion

No community discussion yet for this question.

Full ZF-100-500 Practice