PHP code example of jaycodesign / decimal
1. Go to this page and download the library: Download jaycodesign/decimal library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jaycodesign / decimal example snippets
use JaycoDesign\Decimal\Decimal;
Decimal::mul(10, 5); // 50
Decimal::div(10, 5); // 2
Decimal::add(10, 5); // 15
Decimal::sub(10, 5); // 5
Decimal::greater_than(1,2); // TRUE
Decimal::less_than(1,2); // FALSE
Decimal::trim(10.3400000); // 10.34