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.

v2.1.0(1mo ago)02293MITPHPPHP &gt;=8.3

Since Dec 11Pushed 1mo 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 4w ago

READMEChangelog (10)Dependencies (2)Versions (17)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

54

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

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

Recently: every ~767 days

Total

16

Last Release

47d ago

Major Versions

v1.15.1 → v2.0.02026-06-27

PHP version history (2 changes)v1.9.0PHP &gt;=5.6

v1.15.1PHP &gt;=8.3

### 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 (33 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

[toplan/laravel-sms

A mobile phone number validation solution based on laravel

83580.2k2](/packages/toplan-laravel-sms)

PHPackages © 2026

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