Codility tasks PHP solutions