PHP code example of loophp / tin
1. Go to this page and download the library: Download loophp/tin 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/ */
loophp / tin example snippets
oophp\Tin\TIN;
$bool = TIN::fromSlug('be71102512345')->isValid();
oophp\Tin\TIN;
use loophp\Tin\Exception\TINException;
try {
TIN::fromSlug('be71102512345')->check();
} catch (TINException $e) {
// do something with the exception.
}
TIN::fromSlug('be7110.2512345')->check(); // Not strict
TIN::fromSlug('be7110.2512345')->check(strict: false); // Not strict
TIN::fromSlug('be7110.2512345')->check(true); // Strict
TIN::fromSlug('be7110.2512345')->check(strict: true); // Strict