php flow control first three tasks