$lines/4) $p += 0.15; // self closing tag if (strpos($src, '/>') !== false) $p += 0.05; // tag with attr if (preg_match('/<[a-zA-Z_]\w*\s+[a-zA-Z_]\w+\s*=["\']/', $src)) $p += 0.1; return $p; } }