/** * Reverse of {@link get_currency_abbr()}. */ function get_currency_key($c) { if (in_array($c, Currencies::getAbbrs())) { return Currencies::getKeyForAbbr($c); } return strtolower($c); }