PHP code example of emretnrvrd / tckn

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

    

emretnrvrd / tckn example snippets


use Emretnrvrd\Tckn\Services\TcknValidator\TcknValidator;

$tcknValidator = new TcknValidator(90626476730);
$tcknValidotor->validate();
//true

/*-----OR-----*/

$tcknValidator = new TcknValidator();
$tcknValidator->setValue(90626476730);
$tcknValidator->validate();
//true

/*-----OR-----*/

// Helpers Usage

validateTckn('90626476730');
//true

use Emretnrvrd\Tckn\Services\TcknVerifier\TcknVerifier;

$tcknVerifier = new TcknVerifier("Ahmet", "Demir", 1997, 12345678910);
$tcknVerifier->verify();
//false

/*-----OR-----*/

// Helpers Usage

verifyTckn("Ahmet", "Demir", 1997, 12345678910);
//false

use Emretnrvrd\Tckn\Services\TcknRandom\TcknRandom;

$tcknRandom = new TcknRandom();
$tcknRandom->generate();
//"34909082386"

/*-----OR-----*/

// Helpers Usage

generateTckn();
//"34909082386"