TSP PHP programming challenge