PHP code example of drlenux / bc-math

1. Go to this page and download the library: Download drlenux/bc-math 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/ */

    

drlenux / bc-math example snippets




use DrLenux\BcMath\BcMathFactory;

BcMathFactory::instance()->bcscale(2);

echo BcMathFactory::instance()->bcadd(1.234, 1.234);
// return 2.46