private function getAmount($amount, $currency) { $list = self::getCurrencyList(); if (!isset($list[$currency])) { throw new \RuntimeException('Invalid currency provided'); } return (int) (100 * bcmul(1, $amount, $list[$currency]['fraction'])); }