- var_dump: documentation ( source)
<?php
class MyDOMDocument extends DOMDocument {
public $some_text = 'foobar';
}
function generate_my_dom_document() {
return new MyDOMDocument();
}
$doc = generate_my_dom_document();
$xpath3 = new DOMXPath($doc);
# buggy behavior: reports 'DOMDocument', the base class
echo get_class($xpath3->document), "\n";
# buggy behavior: reports 'Undefined property'
var_dump($xpath3->document->some_text);