PHP code example of saki / bcmath-number-polyfill
1. Go to this page and download the library: Download saki/bcmath-number-polyfill 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/ */
saki / bcmath-number-polyfill example snippets
use BcMath\Number;
$number = new Number('1.23');
$rounded = $number->round(1, RoundingMode::AwayFromZero);
var_dump($rounded);