PHP code example of amsterdan / mask
1. Go to this page and download the library: Download amsterdan/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/ */
amsterdan / mask example snippets
use Amsterdan\Mask;
//对于非自动加载,请打开下面的注释
/**
spl_autoload_register(function ($class) {
tr) . PHP_EOL;
$str = '6222003602101234080';
echo Mask::formatBankCard($str) . PHP_EOL;
$str = '123456';
echo Mask::formatPassword($str) . PHP_EOL;
$str = '[email protected]';
echo Mask::formatEmail($str) . PHP_EOL;
$data = [
'id_card' => '44528119991005005X',
'idcard' => '44528119991005005X',
'identity_id' => '44528119991005005X',
'idNumber' => '44528119991005005X',
'id_number' => '44528119991005005X',
];
$data = Mask::format($data);