Anonymous
public php v1 · immutablefunction is_only_links($comment) { // strip out all URLs from the comment $comment = preg_replace("'https*://(\S*)'", "", $comment); $comment = preg_replace("'<a ([^<]*?)</a>'", "", $comment); // trim out any whitespace $comment = trim($comment); if (empty($comment)) return true; else return false;}