- var_dump: documentation ( source)
<?php
$html = <<<HTML
<a href="http://aaa.com">http://aaa.com</a>
HTML;
$dom = new DOMDocument();
$dom->loadHTML($html);
foreach ($dom->getElementsByTagName('a') as $link) {
var_dump($link->getAttribute('href'));
}