Various tasks from previous exams coded in PHP