PHP code example of artox-lab / iso4217

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

    

artox-lab / iso4217 example snippets

 php


$iso4217 = new \Payum\ISO4217\ISO4217; 

$euro = $iso4217->findByAlpha3('EUR');

// or

$euro = $iso4217->findByNumeric('978');

$euro->getName();    // Euro
$euro->getAlpha3();  // EUR
$euro->getNumeric(); // 978
$euro->getExp();     // 2
$euro->getCountry(); // ['AD', 'AT' ... 'YT', 'ZW']


// same instance
$iso4217->findByAlpha3('EUR') === $iso4217->findByAlpha3('EUR'); // true
$iso4217->findByAlpha3('EUR') === $iso4217->findByAlpha3('USD'); // false