This package a simple wrapper around Simple Html Dom Parser library.
Install package by executing the command.
composer require yubarajshrestha/html-dom-parser
use YubarajShrestha\HtmlDomParser\Parser;
public function parse_tags()
{
$html = '<div>
<ul>
<li>PHP</li>
<li>Python</li>
</ul>
</div>';
$parsed = Parser::str_get_html($html);
}
Credit PHP Simple HTML DOM Parser