- var_dump: documentation ( source)
<?php
function foo() {
global $d;
$d = new DOMDocument;
$c = $d->createDocumentFragment();
$g = $d->createElement('fiz', 'buz');
$h = $d->createElement('red', 'xen');
$c->appendChild($g);
$c->appendChild($h);
return $c->childNodes;
}
foreach (foo() as $x) {
var_dump($x->nodeValue);
}
var_dump(get_class($d));