Are there existing word lists available for filtering out common words in PHP search functions?

When implementing search functions in PHP, it is common to filter out common words like "and", "or", "the" to improve search accuracy. One way to do this is by using existing word lists that contain these common words. By comparing search terms against this list, you can exclude common words from the search query.

// Existing word list containing common words to filter out
$commonWords = array("and", "or", "the", "is", "it");

// Example search query
$searchQuery = "The quick brown fox and the lazy dog";

// Remove common words from search query
$filteredQuery = array_diff(explode(" ", strtolower($searchQuery)), $commonWords);

// Output filtered search query
echo implode(" ", $filteredQuery);