A PHP solution to the Synacore Challenge https://challenge.synacor.com/