1. Go to this page and download the library: Download devtrope/profanity-filter library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
devtrope / profanity-filter example snippets
use ProfanityFilter\ProfanityFilter;
$filter = new ProfanityFilter();
echo $filter->clean('This sh1t is funny'); // This **** is funny
$filter = new ProfanityFilter();
$filter->clean('This shit is funny'); // This **** is funny
$filter->clean('This shit is funny', '#'); // This #### is funny
$filter->containsProfanity('This shit is funny'); // true
$filter->containsProfanity('This is a class'); // false