PHP code example of goldbach-algorithms / mask
1. Go to this page and download the library: Download goldbach-algorithms/mask library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
goldbach-algorithms / mask example snippets
# 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','##/##/####');