PHP Classes

Is Prime: Check whether a number is prime

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 349 All time: 6,504 This week: 1,343Up
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: 2434109 in United Kingdom United Kingdom
Week rank: 1545 Up61 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:349All time:6,504
 This week:0This week:1,343Up