PHPackages                             valkhan/easymask - 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. valkhan/easymask

ActiveLibrary

valkhan/easymask
================

A unique file for most commom masks.

1.1.2(5y ago)0332MITPHPPHP &gt;=5.3.0

Since Jan 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Valkhan/EasyMask)[ Packagist](https://packagist.org/packages/valkhan/easymask)[ Docs](https://github.com/Valkhan/EasyMask/)[ RSS](/packages/valkhan-easymask/feed)WikiDiscussions master Synced today

READMEChangelog (5)DependenciesVersions (7)Used By (0)

EasyMask
========

[](#easymask)

Easy PHP mask class for: Phone Numbers, Dates, Documents and more...

Usage:
------

[](#usage)

The file is self-explanatory, some examples below:

```
//include [pathtoclass]; //-- Only necessary if used without composer's autoload
$EasyMask = new Valkhan\EasyTools\EasyMask();
$EasyMask->date("2016-01-18","m/Y","Y-m-d"); // returns "01/2016"
$EasyMask->number("1234.56",2,",",""); // returns "R$ 1234,56"
$EasyMask->number("1234.56",2,",","","R$","reais."); // returns "R$ 1234,56 reais."
$EasyMask->phone("11112222"); // returns "1111-2222"
$EasyMask->phone("111112222"); // returns "11111-2222"
$EasyMask->phone("3311112222"); // returns "(033)1111-2222"
$EasyMask->phone("33111112222"); // returns "(033)11111-2222"
$EasyMask->phone("4433111112222"); // returns "+044(033)11111-2222"

```

Future Plans:
-------------

[](#future-plans)

- Add more masks :)

Changelog:
----------

[](#changelog)

### v1.1.0

[](#v110)

- Added support for most commom brazilian documents
- All documents where put in a single function
- Changed from substr to preg\_replace
- Added test file

### v1.0.1:

[](#v101)

- Added composer.json and composer compatibility

### v1.0.0:

[](#v100)

- Added support for phone numbers: (8-9) digits phone + (2-3) digits area code + country code
- Added support for dates.
- Added support for Zip Codes.
- Added support for Documents: CPF/CNPJ (Brazil)
- Added support for Numbers.

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Recently: every ~465 days

Total

6

Last Release

1853d ago

### Community

Maintainers

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

---

Top Contributors

[![Valkhan](https://avatars.githubusercontent.com/u/9582764?v=4)](https://github.com/Valkhan "Valkhan (12 commits)")

---

Tags

phpphpeasymask

### Embed Badge

![Health badge](/badges/valkhan-easymask/health.svg)

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

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67723.5k15](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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