PageRenderTime 34ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/xml/print_r.php

http://github.com/facebook/hiphop-php
PHP | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 30b9b5d7dca65b7f60115d2227d6bba4 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. <<__EntryPoint>>
  3. function main_print_r() {
  4. $xml = <<<XML
  5. <root>
  6. <A>Hello</A>
  7. <B prop="val">World</B>
  8. </root>
  9. XML;
  10. $doc = new DOMDocument;
  11. $doc->loadXML($xml);
  12. echo "--Document--\n";
  13. print_r($doc);
  14. echo "--Element--\n";
  15. print_r($doc->documentElement);
  16. }