PHP code example of beerntea / iban

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

    

beerntea / iban example snippets



Beerntea\IBAN;

$iban = new IBAN('NL58ABNA0000000001');

// validate the IBAN
if (!$iban->validate($error)) {
    echo "IBAN is not valid, error: " . $error;
}

// pretty print IBAN
echo $iban->format();