PHP DOMDocument improved