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    
Last Updated Ratings Unique User Downloads Download Rankings
2013-06-23 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 352 All time: 6,589 This week: 909Up
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 United Kingdom
Age: ???
All time rank: 216294 in United Kingdom United Kingdom
Week rank: 1577 Up63 in United Kingdom 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  
This week:0
All time:6,589
This week:909Up