PHP code example of djmarland / isin

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

    

djmarland / isin example snippets


use Djmarland\ISIN;

$number = 'GB00B3W23161';
$isin = new ISIN($number);

$value = $isin->getValue();
// GB00B3W23161

$digit = $isin->getCheckDigit();
// 1

echo 'The ISIN is ' . $isin;
// The ISIN is GB00B3W23161

$valid = ISIN::isValid('GB00B3W23161');
// true

$number = ISIN::validate('gb00b3w23161');
// GB00B3W23161
$number = ISIN::validate('ABC');
// InvalidISINException