$fv = financial\fv(0.05, 10, -10000); // calculates future value with a 5% annual interest rate, 10 years, and -10000 present value $pmt = financial\pmt(0.08/12, 5*12, 8000); // calculates monthly payments for a 5-year loan at 8% annual interest with a total loan of 8000
$info = stocks\get_company_info('AAPL'); // retrieves financial information for Apple Inc. $prices = stocks\get_historical_prices('AAPL', '2021-01-01', '2021-12-31'); // retrieves daily stock prices for Apple Inc. from January 1, 2021 to December 31, 2021
$rate = currency\exchange_rate('USD', 'EUR'); // retrieves the exchange rate for converting USD to EUR $amount = 100; $converted = currency\convert('USD', 'EUR', $amount); // converts 100 USD to EUR $formatted = currency\format('EUR', $converted); // formats the converted amount as a currency value in EUROverall, these modules provide a comprehensive set of tools for financial and accounting tasks in PHP. They are part of the standard PHP module library.