buchin / badwords
Badwords filter in PHP
Installs: 3 621
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 3
Forks: 12
Open Issues: 0
Requires (Dev)
- kahlan/kahlan: dev-master
This package is auto-updated.
Last update: 2024-10-29 05:10:44 UTC
README
PHP bad words detector
Installation
composer require buchin/badwords dev-master
Usage
<?php use Buchin\Badwords\Badwords; Badwords::isDirty('Blood sugar sex magic'); /* when string contains bad words, it returns true Example result: (boolean) true */ Badwords::strip('Blood sugar sex magic'); /* given string contains bad words, it replaces vocal chars in bad word with asterix Example result: (string) "Blood sugar s*x magic" */