Location: PHPKode > scripts > Math prime 4.0 or higher > math-prime-4-0-or-higher/math_prime_test.php
<?php
/*
 _____                    ______ _   _ ______
|  __ \                   | ___ \ | | || ___ \
| |  \/_ __ ___  ___ _ __ | |_/ / |_| || |_/ /
| | __| '__/ _ \/ _ \ '_ \|  __/|  _  ||  __/
| |_\ \ | |  __/  __/ | | | |   | | | || |
 \____/_|  \___|\___|_| |_\_|   \_| |_/\_|
----------------------------------------------
(C)BOBAK 2008                             V4.0
----------------------------------------------
web   : http://www.greenphp.com
email : hide@address.com
----------------------------------------------
*/

/**
 * Check a number if prime : tests
 *
 * @author Bobak
 * @package math
 * @subpackage prime
 */

require_once('math_prime.php');

echo "First prims of 2^16<BR><BR>";

for ($i=1;$i<65536;$i++)
   {
   if (math_prime::test($i)) {echo "$i ";}
   }
?>
Return current item: Math prime 4.0 or higher