Codility lessons in PHP