|Your class creates links inside other links if it finds the keyword.|
$keywords = "test";
$linksArray = array("http://mysite.com/test.html");
$content = "<a href=\"test.html\">test</a> This is also a test.";
$al = new autolink($keywords, $linksArray, $content);
I also get this:
Notice: Undefined index: test in /home/nick/public_html/temp/testing.php on line 51
Also, you should supress id and class if it has nothing in it.