Php functions to make you work faster.
Sysvale Helpers requires PHP >= 7.2 and php-mbstring extension
With composer:
composer require sysvale/helpers
- maskBank
- maskCpf
- unMaskCpf
- maskPhone
- maskMoney
- maskCep
- maskCnpj
- trimpp
- titleCase
- firstUpper
- urlNoCache
- ptDate2IsoDate
- regexAccents
- toInt
- toFloat
- toTime
- toArray
- toArrayInt
- toData
- toBool
- toBoolNotNull
- removeAccents
- compareVersion
- monthPt
- removeCrassLetters
- validateCpf
- weekDay
- city
- getNFirstWords
use Sysvale/Helpers;
$bankNumber = 12345;
$maskedBank = Helpers::maskBank($bankNumber);
// $maskedBank will be 1234-5
use Sysvale/Helpers;
$text = " Text \t \n "; //String with spaces and special caracter;
$text = Helpers::trimpp($text);
// $text will be Text
use Sysvale/Helpers;
$url = 'http://url.com.br';
$url = Helpers::urlNoCache($url);
// $url will be http://url.com.br?1570588480
If you are interested in contributing, please read and abide by the contributing guidelines.