PHPackages                             onx/sanitize - 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. onx/sanitize

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

onx/sanitize
============

Helper that provides methods for text sanitization.

1.2.2(2y ago)015MITPHPPHP ^8.1.0 || ^8.2.0

Since Dec 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Zdezorientowany/OnxSanitize)[ Packagist](https://packagist.org/packages/onx/sanitize)[ RSS](/packages/onx-sanitize/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (9)Used By (0)

Onx Sanitize is a PHP library that provides helper method for text sanitization.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require onx/sanitize
```

Usage
-----

[](#usage)

You can use Facade like this:

```
use Onx\Sanitize\Sanitize;

$text = '  Hello, world!  ';
$sanitizedText = Sanitize::text($text);

echo $sanitizedText; // Output: Hello, world!
```

Or you can also directly use the sanitize function:

```
$text = '  Hello, world!  ';
$sanitizedText = sanitize($text);

echo $sanitizedText; // Output: Hello, world!
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~0 days

Total

6

Last Release

935d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e974f2eb3f25ba615cea3382a04196ef55ffb1edc00dbf93d5a024d2d4c4cfaf?d=identicon)[watashi](/maintainers/watashi)

---

Top Contributors

[![Zdezorientowany](https://avatars.githubusercontent.com/u/49677053?v=4)](https://github.com/Zdezorientowany "Zdezorientowany (27 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onx-sanitize/health.svg)

```
[![Health](https://phpackages.com/badges/onx-sanitize/health.svg)](https://phpackages.com/packages/onx-sanitize)
```

###  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)
