PHPackages                             sysvale/helpers - 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. sysvale/helpers

ActiveLibrary

sysvale/helpers
===============

Helper function in PHP

2.5(2mo ago)815.0k↓30.8%10[3 PRs](https://github.com/Sysvale/helpers/pulls)MITPHPPHP &gt;=7.4CI passing

Since Aug 13Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/Sysvale/helpers)[ Packagist](https://packagist.org/packages/sysvale/helpers)[ RSS](/packages/sysvale-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (25)Used By (0)

Sysvale Helpers
===============

[](#sysvale-helpers)

[![Build Status](https://camo.githubusercontent.com/31bca367d0663c3487e72434177280774286147f79f4e7ed3a37fd90b549c7df/68747470733a2f2f7472617669732d63692e636f6d2f53797376616c652f68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Sysvale/helpers)

PHP functions to make you work faster.

Sysvale Helpers requires PHP &gt;= 7.2 and php-mbstring extension

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

[](#installation)

With composer:

```
composer require sysvale/helpers
```

Helpers class methods
---------------------

[](#helpers-class-methods)

- [maskBank](#maskBank)
- [maskCpf](#maskCpf)
- [unMaskCpf](#unMaskCpf)
- [maskPhone](#maskPhone)
- [maskMoney](#maskMoney)
- [maskCep](#maskCep)
- [maskCnpj](#maskCnpj)
- [trimpp](#trimpp)
- titleCase
- firstUpper
- [urlNoCache](#urlNoCache)
- ptDate2IsoDate
- regexAccents
- toInt
- toFloat
- toTime
- toArray
- toArrayInt
- toData
- toBool
- toBoolNotNull
- removeAccents
- compareVersion
- monthPt
- removeCrassLetters
- validateCpf
- validateCNPJ
- validatePhone
- weekDay
- validateResidentialPhone
- validateMobilePhone
- getNFirstWords

### Usage Examples

[](#usage-examples)

#### maskBank

[](#maskbank)

```
use Sysvale\Helpers;

$bankNumber = 12345;

$maskedBank = Helpers::maskBank($bankNumber);

// $maskedBank will be 1234-5
```

#### maskCpf

[](#maskcpf)

```
use Sysvale\Helpers;

$cpf = '12345678901';

$maskedCpf = Helpers::maskCpf($cpf);

// $maskedCpf will be 123.456.789-01
```

#### unMaskCpf

[](#unmaskcpf)

```
use Sysvale\Helpers;

$cpf = '123.456.789-01';

$unMaskedCpf = Helpers::unMaskCpf($cpf);

// $unMaskedCpf will be 12345678901
```

#### maskPhone

[](#maskphone)

```
use Sysvale\Helpers;

$phone = '79988001010';

$maskedPhone = Helpers::maskPhone($phone);

// $maskedPhone will be (79) 98800-1010
```

#### maskMoney

[](#maskmoney)

```
use Sysvale\Helpers;

$value = 1234.56;

$maskedMoney = Helpers::maskMoney($value);

// $maskedMoney will be 1.234,56
```

#### maskCep

[](#maskcep)

```
use Sysvale\Helpers;

$cep = '49000000';

$maskedCep = Helpers::maskCep($cep);

// $maskedCep will be 49000-000
```

#### maskCnpj

[](#maskcnpj)

```
use Sysvale\Helpers;

$cnpj = '12345678000199';

$maskedCnpj = Helpers::maskCnpj($cnpj);

// $maskedCnpj will be 12.345.678/0001-99
```

#### trimpp

[](#trimpp)

```
use Sysvale\Helpers;

$text = " Text \t \n "; //String with spaces and special caracter;

$text = Helpers::trimpp($text);

// $text will be Text
```

#### urlNoCache

[](#urlnocache)

```
use Sysvale\Helpers;

$url = 'http://url.com.br';

$url = Helpers::urlNoCache($url);

// $url will be http://url.com.br?1570588480
```

Validate class
--------------

[](#validate-class)

The validation methods can be accessed directly in the `Validate` class. To use the class import as in the example:

```
  use Sysvale\Helpers\Validate;
```

### Validate class methods

[](#validate-class-methods)

- [isValidCpf](#isValidCpf)
- [isValidCnpj](#isValidCnpj)
- [isValidPhone](#isValidPhone)
- [isValidResidentialPhone](#isValidResidentialPhone)
- [isValidMobilePhone](#isValidMobilePhone)

### Use exemples

[](#use-exemples)

#### isValidCpf

[](#isvalidcpf)

```
use Sysvale\Helpers\Validate;

$value = '334.734.750-17';

$isValid = Validate::isValidCpf($value);

// true
```

#### isValidCnpj

[](#isvalidcnpj)

```
use Sysvale\Helpers\Validate;

$value = '56.396.710/0001-37';

$isValid = Validate::isValidCnpj($value);

// true
```

#### isValidPhone

[](#isvalidphone)

```
use Sysvale\Helpers\Validate;

$value = '79988001010';

$isValid = Validate::isValidPhone($value);

// true
```

#### isValidResidentialPhone

[](#isvalidresidentialphone)

```
use Sysvale\Helpers\Validate;

$value = '7033662200';

$isValid = Validate::isValidResidentialPhone($value);

// true
```

#### isValidMobilePhone

[](#isvalidmobilephone)

```
use Sysvale\Helpers\Validate;

$value = '70993662200';

$isValid = Validate::isValidMobilePhone($value);

// true
```

Contributing Guidelines
-----------------------

[](#contributing-guidelines)

If you are interested in contributing, please read and abide by the [contributing guidelines](CONTRIBUTING.md).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~451 days

Total

7

Last Release

75d ago

Major Versions

1.1 → 2.02021-03-25

PHP version history (2 changes)1.1PHP &gt;=7.2

2.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/80c16d2abfca7bb24c17270c351e3d746aa86bd080583b494659745b6b140327?d=identicon)[geidsonc](/maintainers/geidsonc)

![](https://www.gravatar.com/avatar/6ea9560bf1dcf763106c8472f07c8f5aa2fa0f9338b0f1396288263ff43829ed?d=identicon)[esron](/maintainers/esron)

---

Top Contributors

[![esron](https://avatars.githubusercontent.com/u/12296599?v=4)](https://github.com/esron "esron (56 commits)")[![geidsonc](https://avatars.githubusercontent.com/u/9142676?v=4)](https://github.com/geidsonc "geidsonc (31 commits)")[![victorgso001](https://avatars.githubusercontent.com/u/34478635?v=4)](https://github.com/victorgso001 "victorgso001 (5 commits)")[![IACF](https://avatars.githubusercontent.com/u/31047524?v=4)](https://github.com/IACF "IACF (5 commits)")[![daniel-werner](https://avatars.githubusercontent.com/u/38726367?v=4)](https://github.com/daniel-werner "daniel-werner (4 commits)")[![andre-bahia](https://avatars.githubusercontent.com/u/25235659?v=4)](https://github.com/andre-bahia "andre-bahia (3 commits)")[![uesley](https://avatars.githubusercontent.com/u/9151402?v=4)](https://github.com/uesley "uesley (2 commits)")[![lissonpsantos2](https://avatars.githubusercontent.com/u/7012996?v=4)](https://github.com/lissonpsantos2 "lissonpsantos2 (2 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")[![denissonleal](https://avatars.githubusercontent.com/u/9142644?v=4)](https://github.com/denissonleal "denissonleal (1 commits)")[![lucasn4s](https://avatars.githubusercontent.com/u/17988272?v=4)](https://github.com/lucasn4s "lucasn4s (1 commits)")[![genivalrocha](https://avatars.githubusercontent.com/u/77002657?v=4)](https://github.com/genivalrocha "genivalrocha (1 commits)")[![ayrtonvwf](https://avatars.githubusercontent.com/u/22180887?v=4)](https://github.com/ayrtonvwf "ayrtonvwf (1 commits)")[![gilmaracastro](https://avatars.githubusercontent.com/u/33189014?v=4)](https://github.com/gilmaracastro "gilmaracastro (1 commits)")

---

Tags

hacktoberfesthelpers-libraryphpsysvale

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sysvale-helpers/health.svg)

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

PHPackages © 2026

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