Codility - Lesson 1: solution to TapeEquilibrium in PHP (Test score: 100%)