buchin / badwords
PHP中的不良词过滤器
1.0.3
2021-09-26 17:47 UTC
Requires (Dev)
- kahlan/kahlan: dev-master
This package is auto-updated.
Last update: 2024-08-29 04:48:29 UTC
README
PHP不良词检测器
安装
composer require buchin/badwords dev-master
使用
<?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" */