php exercise: day/night