alcohol/iso4217
Lightweight PHP library with ISO 4217 currency data. Look up currencies by alpha-3 (e.g., EUR) or numeric code (978), or retrieve the full list, including name, minor unit exponent, and associated country codes.
A PHP library providing ISO 4217 data.
ISO 4217 is a standard published by the International Organization for Standardization, which delineates currency designators, country codes (alpha and numeric), and references to minor units in three tables.
-- Wikipedia
$ composer require alcohol/iso4217
Code:
<?php
$iso4217 = new Alcohol\ISO4217();
$iso4217->getByAlpha3('EUR');
// or
$iso4217->getByNumeric('978');
// also
$iso4217->getAll();
Result:
Array
(
[name] => Euro
[alpha3] => EUR
[numeric] => 978
[exp] => 2
[country] => Array
(
[0] => AD
[1] => AT
...
[30] => YT
[31] => ZW
)
)
The following codes have been intentionally left out:
Also some currencies that are deprecated:
Feel free to submit a pull request or create an issue.
alcohol/iso4217 is licensed under the MIT license.
How can I help you explore Laravel packages today?