PHP code example of alustau / math

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

    

alustau / math example snippets



use Math\PrimeNumber;

$math = new PrimeNumber();

$math->isPrime(11); // true

//add a range from 1 to 100
$math->setNumbers(range(1,100));

$math->getPrimes(); // [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]

$math->count();// 25