This is a simple DomParser which can parse invalid html too. Edited version of http://simplehtmldom.sourceforge.net/.
composer require tje3d/domparser
$dom = Tje3d\DomParser\DomParser::parse(file_get_contents('url'))
$dom->find('.elementClass') // All element's with this class
$dom->find('#myId', 0) // First element with this id
$dom->find('[name=user]')
innerText, innerHTML, html, getAllAttributes, getAttribute, attr, hasAttribute, parentNode, nextSibling, previousSibling, nodeName