Project Euler solutions in PHP