$html = '
<!doctype html>
<html>
<head><title></title></head>
<body>
<p>This is just p</p>
<p>This is p as last child</p>
</body>
</html>
';
$DOM = new simplehtmldom\HtmlDocument();
$DOM->load($html);
$selector = 'p:last-child';
print_r($DOM->find($selector));
// The array is empty while it should consist of one element
Pseudo-classes are currently not supported. Refer to the documentation for the find method for a list of supported selectors.
In this case, I suggest using the lastChild method, which will give you the same result as
:last-child.