PHP code example of enberg / viite

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

    

enberg / viite example snippets


$input = '123123';
$referenceNumber = Viite\generate($input);

echo $referenceNumber; // "1231234"

// Viite also contains a function for formatting reference numbers according to finnish conventions
echo Viite\format($referenceNumber); // Yields "12312 34"

if (Viite\check('1231234')) {
    echo 'Yay!';
}