This librairy provides utilities function to ease math & stats
Install package with composer
composer require hugsbrugs/php-math
In your PHP code, load library
require_once __DIR__ . '/../vendor/autoload.php';
use Hug\Math\Math as Math;
Return modulo of a number given a divider
Math::modulo($nb, $divider);
Compute Dice Coefficient for 2 given texts
Math::dice($str1 = '', $str2 = '');
phpunit --bootstrap vendor/autoload.php test
Hugo Maugey visit my website ;)