updated p3 php to use correct isprime()