Earlier this week, a developer asked the Rails subreddit to help refactor some code they had written for an interview.

It was a nice and small little problem so I ported the original solution to PHP and took a stab at refactoring it in screencast format.

Check it out and let me know what you think!