This would be a perfect use case for the new PHP 5.5 ``finally`` keyword btw...