PHP code example of abdulmajidcse / code-mask

1. Go to this page and download the library: Download abdulmajidcse/code-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/ */

    

abdulmajidcse / code-mask example snippets


use Abdulmajidcse\CodeMask\CodeMask;

$codeMask = new CodeMask();
$phoneNumber = "1234567890";
$hidePhoneNumber = $codeMask->hideString($phoneNumber, 2, 2);

echo $hidePhoneNumber; // output: 12******90

use Abdulmajidcse\CodeMask\CodeMask;

$codeMask = new CodeMask();
$id = $codeMask->generateId(123, 10, 0, '2701');

echo $id; // output: 27010000000123

use Abdulmajidcse\CodeMask\CodeMask;

$codeMask = new CodeMask();

$moneyWithLeftCurrency = $codeMask->moneyFormat(100000000.556, 'TK');
echo $moneyWithLeftCurrency; // output: TK 10,00,00,000.56

$moneyWithRightCurrency = $codeMask->moneyFormat(100000000.556, '', 'BDT');
echo $moneyWithRightCurrency; // output: 10,00,00,000.56 BDT