Project Euler Problem 16(PHP)