PHP code example of moontoast / math

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

    

moontoast / math example snippets


$bn = new \Moontoast\Math\BigNumber('9,223,372,036,854,775,808');
$bn->multiply(35);

var_dump($bn->getValue());
var_dump($bn->convertToBase(16));

$uuid = \Moontoast\Math\BigNumber::convertToBase10('ff6f8cb0c57d11e19b210800200c9a66', 16);

$bn = new \Moontoast\Math\BigNumber($uuid);
echo $bn; // 339532337419071774305803111643925486182