PHP code example of tohmua / slk581

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

    

tohmua / slk581 example snippets


$slk581 = new SLK581\SLK581();

$slk581->generate(
    $firstName   = 'firstname',
    $lastName    = 'lastname',
    $dateOfBirth = '11/11/2016', // must be formatted dd/mm/yyyy
    $gender      = 2             // see documentation or 'src/Fields/Interfaces/Gender.php' for gender codes
); // ASNIR111120162

$slk581 = new SLK581\SLK581();

$slk581->generate(
    $firstName   = 'firstname',
    $lastName    = 'lastname',
    $dateOfBirth = '',
    $gender      = 2
); // (bool) FALSE

$slk581->errorMessage(); //SLK581 Error: No Date of Birth supplied. This is