Project Euler Problem 7(PHP)