PHPackages                             php-sensitive/sensitive-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. php-sensitive/sensitive-filter

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

php-sensitive/sensitive-filter
==============================

sensitive word filter

1.0.0.x-dev(1y ago)04MITPHPPHP ^7.1

Since Jul 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zwmm/sensitive-filter)[ Packagist](https://packagist.org/packages/php-sensitive/sensitive-filter)[ RSS](/packages/php-sensitive-sensitive-filter/feed)WikiDiscussions dev Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

sensitive-filter
================

[](#sensitive-filter)

DFA sensitive word filter

使用方法
----

[](#使用方法)

```
composer require php-sensitive/sensitive-filter

```

---

```
include_once "./vendor/autoload.php";
use \PhpSensitive\SensitiveFilter\Sensitive;

$filePath = __DIR__."/word.txt";
$instance =Sensitive::getInstance($filePath);

//仅匹配一个敏感词 true
$phrase = "你傻瓜,傻蛋,傻瓜子";
echo $instance::execFilter($phrase,true);

```

---

#### 添加敏感词，组成树结构

[](#添加敏感词组成树结构)

---

```
[
  [傻]=>[
    [子]=>[
      [是]=>[
        [傻]=>[
          [帽]=>[false]
        ]
      ]
    ],
    [蛋]=>[false]
  ],
  [白]=>[
    [痴]=>[false]
  ]
]

```

---

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

707d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28528185?v=4)[zwmm](/maintainers/zwmm)[@zwmm](https://github.com/zwmm)

---

Top Contributors

[![zwmm](https://avatars.githubusercontent.com/u/28528185?v=4)](https://github.com/zwmm "zwmm (5 commits)")

### Embed Badge

![Health badge](/badges/php-sensitive-sensitive-filter/health.svg)

```
[![Health](https://phpackages.com/badges/php-sensitive-sensitive-filter/health.svg)](https://phpackages.com/packages/php-sensitive-sensitive-filter)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
