function prime_factors ($number
{
$factors = array();
while$number > 1)
{
$prime = 2;
while$number % $prime != 0)
{
$prime = next_prime$prime);
}
if$prime > floor$number/2))
{
$factors[] = $number
break
}
$factors[] = $prime
$number = $number$prime
}
return $factors
}