PHP Classes

Is Prime: Check whether a number is prime

Recommend this page to a friend!
  Info   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 39%Total: 358 All time: 6,920 This week: 120Up
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: 312 Up8 in United Kingdom Up
Innovation award
Innovation award
Nominee: 3x

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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:358
This week:0
All time:6,920
This week:120Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:39%StarStar
Rank:3782