PHP code example of itsmelepassos / maskdocs-br
1. Go to this page and download the library: Download itsmelepassos/maskdocs-br 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/ */
itsmelepassos / maskdocs-br example snippets
= "71756816077";
$cnpj = "49620643000127";
$cpfMasked = mask_document($cpf, '***.***.***-**');
$cnpjMasked = mask_document($cnpj, '**.***.***/****-**');
$cpfHidden = hide_document($cpfMasked);
$cnpjHidden = hide_document($cnpjMasked);
echo "Docs sem máscara - CPF: $cpf; CNPJ: $cnpj";
echo "<hr>";
echo "Docs com máscara - CPF: $cpfMasked; CNPJ: $cnpjMasked";
echo "<hr>";
echo "Docs parcialmente ocultos - CPF: $cpfHidden; CNPJ: $cnpjHidden";
"autoload": {
"files": [
"Helpers/Helpers.php"
]
}