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