Download the PHP package tiny-blocks/money without Composer
On this page you can find all versions of the php package tiny-blocks/money. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tiny-blocks/money
More information about tiny-blocks/money
Files in tiny-blocks/money
Package money
Short Description Value Object that represents a monetary value.
License MIT
Homepage https://github.com/tiny-blocks/money
Informations about the package money
Money
- Overview
- Installation
- How to use
- License
- Contributing
Overview
Value Object that represents a monetary value.
Installation
How to use
The library exposes a concrete implementation for representing and performing monetary operations.
Using the from method
With the from
method, a new instance of type Money
is created from a valid numeric value. You can provide
a string
, float
or BigNumber
value.
Floating point values instantiated from a float
may not be safe, as they are imprecise by design and may result in a
loss of precision. Always prefer to instantiate from a string
, which supports an unlimited amount digits.
Using the methods of mathematical operations
Addition
Performs an addition operation between this value and another value.
Subtraction
Performs a subtraction operation between this value and another value.
Multiplication
Performs a multiplication operation between this value and another value.
Division
Performs a division operation between this value and another value.
License
Money is licensed under MIT.
Contributing
Please follow the contributing guidelines to contribute to the project.
All versions of money with dependencies
tiny-blocks/math Version ^2.0
tiny-blocks/currency Version ^2.0
tiny-blocks/value-object Version ^2.0