World Currency list in PHP constants and in array (Currency::USD)

Overview

World Currency list in PHP constants and in array (Currency::USD)

If you need to work with currencies in the code and describe each time "USD", "EUR" ... then this solution is for you. Enjoy echo Currency::EUR >>> "EUR" Don't repeat yourself in code.

Alt Text

Features

  • List of all world currencies;
  • Additional fields countryName, name, symbol;

Install

composer require krepysh-spec/currency

How it works

From constants:

echo KrepyshSpec\World\Currency::ANG; // >> 'ANG'
echo KrepyshSpec\World\Currency::USD; // >> 'USD'
echo KrepyshSpec\World\Currency::EUR; // >> 'EUR'

Get all currencies from array:

array(3) { ["countryName"]=> string(11) "Afghanistan" ["name"]=> string(19) "Afghanistan Afghani" ["symbol"]=> string(7) "؋" } ["ARS"]=> array(3) { ["countryName"]=> string(9) "Argentina" ["name"]=> string(14) "Argentine Peso" ["symbol"]=> string(5) "$" } ["AWG"]=> array(3) { ["countryName"]=> string(5) "Aruba" ["name"]=> string(13) "Aruban florin" ["symbol"]=> string(6) "ƒ" } ... */">
$allCurrencies = KrepyshSpec\World\Currency::all();
var_dump($allCurrencies);

/**
 ["AFN"]=>
  array(3) {
    ["countryName"]=>
    string(11) "Afghanistan"
    ["name"]=>
    string(19) "Afghanistan Afghani"
    ["symbol"]=>
    string(7) "؋"
  }
  ["ARS"]=>
  array(3) {
    ["countryName"]=>
    string(9) "Argentina"
    ["name"]=>
    string(14) "Argentine Peso"
    ["symbol"]=>
    string(5) "$"
  }
  ["AWG"]=>
  array(3) {
    ["countryName"]=>
    string(5) "Aruba"
    ["name"]=>
    string(13) "Aruban florin"
    ["symbol"]=>
    string(6) "ƒ"
  }
 ...
 */

Support

For support, email [email protected] or telegram @krep1sh

License

MIT

You might also like...
Your alter ego object. Takes the best of object and array worlds.

Supporting Opensource formapro\values is an MIT-licensed open source project with its ongoing development made possible entirely by the support of com

PHP bundle which makes array traversing / inserting dead easy.

XTraverse.php This bundle makes it dead easy to traverse through nested arrays/objects in PHP. Installation Via Composer composer require phiil/xtrave

A PocketMine-MP plugin that can reduce or clean up the chunks in your world

AutoClearChunk A PocketMine-MP plugin that can reduce or clean up the chunks in your world Features Custom Clear Message Custom Clear Interval Time Pe

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

We go for better world
We go for better world

Nasa-Space-Apps-Challenge-2021 We go for better world Team: Dynamo Warrior Team Member Mazharul Hasan Fozilatunnesa Mestu Paul Nayeem Hossain Belal Ud

Moodle - the world's open source learning platform

.-..-. _____ | || | /____/-.---_ .---. .---. .-.| || | .---. | | _ _ |/ _ \/ _ \/ _ || |/ __ \ * | | |

A plugin that teleports to world with Fancy Loading screen like WaterdogPE!

FancyTeleportScreen This is was made by Dyzer Development This plugin was allows you to teleport other world with LoadingScreen! Information This is w

A WordPress plugin that displays proxied war news from the free world to Russian IP address visitors with option to block further access.
A WordPress plugin that displays proxied war news from the free world to Russian IP address visitors with option to block further access.

A WordPress plugin that displays proxied war news from the free world to Russian IP address visitors with option to block further access.

A simple plugin to teleport the player to world spawn when taking damage!

πŸ§™β€β™‚οΈ β€’ Damage TP Version Status Date 1.0.0 stable-dev 12/10/2022 πŸ“« β€’ General: Plugin Introduction: This is a simple plugin that teleports the player

Releases(1.0.1)
Owner
Krepysh
Glad to see you on my page. I am a php developer. I love to code and develop. I will be glad if you like something from my work.
Krepysh
A plugin to make life easier for users who need to edit specific functions of a world and also create, rename and delete worlds quickly using commands or the world management menu.

A plugin to make life easier for users who need to edit specific functions of a world and also create, rename and delete worlds quickly using commands or the world management menu.

ImperaZim 0 Nov 6, 2022
YCOM Impersonate. Login as selected YCOM user πŸ§™β€β™‚οΈin frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 -> DF world conversion.

ChunkLoader A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 -> DF

null 2 Aug 10, 2022
Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangerate.host

Currency Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangera

Amr Shawky 19 Dec 12, 2022
This library can be used, among other things, to retrieve the classes, interfaces, traits, enums, functions and constants declared in a file

marijnvanwezel/reflection-file Library that allows reflection of files. This library can be used, among other things, to retrieve the classes, interfa

Marijn van Wezel 5 Apr 17, 2022
Polonium is a world class old school ✍️ blog website made with Php and Tailwind πŸŒ€

Polonium Polonium is a world class old school ✍️ blog website made with Php and Tailwind ?? to write dump articles about... Yeah I know, you should pr

Youness Idbakkasse 2 Jan 10, 2022
World countries - available in multiple languages, in CSV, JSON, PHP, SQL and XML formats

Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP, SQL and XML formats, in multiple languages and with national flags included; also available are the ISO 3166-2 codes of provinces/ states associated with the countries

Stefan Gabos 1k Dec 29, 2022
A sample project to showcase a real world example and benchmarks for crowphp

CrowPHP Sample project This project is to showcase an example of how a real world project might look like. It has two basic endpoints to show-case the

Crow PHP 3 Aug 16, 2021
A PocketMine plugin with advanced world tools and maybe can beat MultiWorld

WorldTools A PocketMine plugin with advanced world tools and maybe can beat MultiWorld This plugin is on development! Helping me with pull request may

Keenan Yafiq 2 Aug 16, 2022
Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

scotch 2.7k Jan 8, 2023