99designs/money-php
Composer 安装命令:
composer require 99designs/money-php
包简介
A library for dealing with money and currency conversion.
README 文档
README
A library for dealing with money and currency conversion. PHP port of http://money.rubyforge.org
Usage
<?php
require_once 'src/money.php';
// 10.00 USD
$money = new money\Money(1000, 'USD');
$money->cents(); // => 1000
$money->currency(); // => new money\Currency("USD")
Status
This project is still a work in progress.
Things to do:
- money comparison
- money arithmetic
- currency conversion
Contributions welcome. :-)
Tests
Tests are located in the tests subdirectory.
You'll need to install PHPUnit before running the tests: http://www.phpunit.de/manual/3.5/en/installation.html
Then run the tests like this:
phpunit tests
Credits
All credit goes to the creators of the Ruby money library. This is a direct port of the code.
统计信息
- 总下载量: 54.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2013-01-03