Solve problem 87 using PHP.