PHPackages                             villermen/data-handling - 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. villermen/data-handling

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

villermen/data-handling
=======================

Library for general data sanitization and validation.

v1.15.0(8y ago)02143MITPHPPHP &gt;=5.6

Since Dec 11Pushed 2d ago1 watchersCompare

[ Source](https://github.com/villermen/data-handling)[ Packagist](https://packagist.org/packages/villermen/data-handling)[ RSS](/packages/villermen-data-handling/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (3)

villermen/data-handling
=======================

[](#villermendata-handling)

PHP library with general data sanitization and formatting utilities. Contains utility methods not otherwise contained in framework components that I see myself needing at times. My "functions.php", if you will.

Examples
--------

[](#examples)

```
Clean::text('dirty &emdash; nastyhtml'); // "dirty — nasty html"
Clean::text('dirty &emdash; nastyhtml', ['br']); // "dirty — nastyhtml"
Clean::alphanumeric('proteïne shake'); // "proteineshake"
Clean::alphanumeric('proteïne shake', ' '); // "proteine shake"
Clean::slug('ßÈÿ žÐ-'); // "ssey-zdj"
Clean::digits("1 abc 23\n4") // "1234"

Path::format('/././//.///path//to\\file'); // "/path/to/file"
Path::merge('/root/directory', '/relative/path'); // "/root/directory/relative/path"
Path::makeRelative('/root/directory', '/root/directory/relative/path') // "relative/path"
Path::formatFilesize(1436549120); // "1.34 GiB"

Filter::match('file23.txt', 'file*.txt') // true
```

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

[](#installation)

```
composer require villermen/data-handling
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance65

Regular maintenance activity

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

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 ~5 days

Total

12

Last Release

3072d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1106303?v=4)[Sjoerd Nuijten](/maintainers/Villermen)[@villermen](https://github.com/villermen)

---

Top Contributors

[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (32 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/villermen-data-handling/health.svg)

```
[![Health](https://phpackages.com/badges/villermen-data-handling/health.svg)](https://phpackages.com/packages/villermen-data-handling)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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