Login   Register  
PHP Classes
elePHPant
Icontem

Is Prime: Check whether a number is prime

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 346 This week: 1All time: 6,207 This week: 1,537Up
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: 3 packages by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 2363104 in United Kingdom United Kingdom
Week rank: 797 Up30 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 2x

  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:346All time:6,207
 This week:1This week:1,537Up