1. Go to this page and download the library: Download alkinbg/masked-bundle 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/ */
use Masked\Bundle\SensitiveDataMasker;
final class PaymentService
{
public function __construct(
private readonly SensitiveDataMasker $masker,
) {
}
public function example(): string
{
return $this->masker->mask(
'Card: 4111111111111111',
);
}
}