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