PHPackages                             messer/mask - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. messer/mask

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

messer/mask
===========

PHP Value Masker by Gustavo Messer

1.5.4(3y ago)08MITPHP

Since Oct 25Pushed 3y agoCompare

[ Source](https://github.com/messertech/mask)[ Packagist](https://packagist.org/packages/messer/mask)[ RSS](/packages/messer-mask/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (15)Used By (0)

Mask
====

[](#mask)

[![](https://camo.githubusercontent.com/9a175a4f892195cd2ca21501d99e63aca89e0bb10c641d2ac5104496fa02b9e1/68747470733a2f2f62616467656e2e6e65742f62616467652f506f776572656425323062792f4775737461766f204d65737365722f726564)](https://github.com/Goldbach07/)[![](https://camo.githubusercontent.com/49c474f4d41e6571226a814e675889a0569e975426152fc074ca08feffdc2768/68747470733a2f2f62616467656e2e6e65742f62616467652f446576656c6f706564253230666f722f5048502f626c7565)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Goldbach Algorithms Mask (old repository) is a PHP library developed for Symfony for apply a mask to values.

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

[](#installation)

Use the composer to install:

```
composer require messer/mask
```

Usage
-----

[](#usage)

It is possible to mask a string to one of the default settings or create a customization from the custom() method.

```
# add use Mask
use GoldbachAlgorithms\Mask\Mask;

# create a new mask
$mask = new Mask();

# returns '89566-410'
$mask->cep('89566410');

# returns '198.298.398-98'
$mask->cpf('19829839898');

# returns '03.635.359/0001-23'
$mask->cnpj('3635359000123');

# returns '12.345.678-9'
$mask->rg('123456789');

# returns '4321.****.****.1234'
$mask->creditCard('4321544534421234');

# returns '(11) 3227-3158'
$mask->phone('1132273158');

# returns '(21) 99943-2343'
$mask->phone('21999432343');

# returns '18/03/1690'
$mask->custom('18031690','##/##/####');
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

Copyright © 2023 [Gustavo Messer](https://github.com/GoldbachAlgorithms/Mask/blob/main/LICENSE)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Recently: every ~0 days

Total

14

Last Release

1100d ago

### Community

Maintainers

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

---

Top Contributors

[![Goldbach07](https://avatars.githubusercontent.com/u/13986904?v=4)](https://github.com/Goldbach07 "Goldbach07 (21 commits)")

### Embed Badge

![Health badge](/badges/messer-mask/health.svg)

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

PHPackages © 2026

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