PHP Classes

Is Prime: Check whether a number is prime

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 39%Total: 359 All time: 6,924 This week: 126Up
Version License PHP version Categories
is-prime 1.0BSD License5.0PHP 5, Math
Description 

Author

This class can check whether a number is prime.

It first checks if the number is divisible by small prime integers.

If it passes the low prime numbers check, the class checks if the number ends with a digit that all higher prime numbers end.

On the final step it checks if the number is divisible by any of the prime numbers that are found incrementally.

Picture of Ahmad Retha
Name: Ahmad Retha <contact>
Classes: 4 packages by
Country: United Kingdom
Age: ???
All time rank: 210094 in United Kingdom
Week rank: 131 Up6 in United Kingdom Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (1)  
File Role Description
Accessible without login Plain text file IsPrime.php Class IsPrime PHP Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:359
This week:0
All time:6,924
This week:126Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:39%StarStar
Rank:3891