1--TEST-- 2DOM Comment : Variation 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6?> 7--FILE-- 8<?php 9 10$xml = <<< EOXML 11<?xml version="1.0" encoding="ISO-8859-1"?><courses><!-- Hello World! --></courses> 12EOXML; 13 14$dom = new DOMDocument(); 15$dom->loadXML($xml); 16$root = $dom->documentElement; 17var_dump($root->hasChildNodes()); 18$children = $root->childNodes; 19 20for ($index = 0; $index < $children->length; $index++) { 21 echo "--- child $index ---\n"; 22 $current = $children->item($index); 23 echo get_class($current), "\n"; 24 var_dump($current->textContent); 25} 26?> 27--EXPECT-- 28bool(true) 29--- child 0 --- 30DOMComment 31string(14) " Hello World! " 32