nearest prime number to a given integer
<p>Hello Folk I'm trying to create a PHP function that finds the nearest prime number to a given integer:
       for example, if you named the function "nearest_prime", it would be used like this:</p>

<pre><code>            $a = 399823;
            $b = nearest_prime($a);
            echo $b;
</code></pre>

<p>*Keep in mind that the integer can be any size, and that the closest prime can be above or below the integer. If two integers are equidistant from the integer, then return the lower one.</p>
