Collections in PHP: my attempt.