Use finally

http://ideone.com/hEgJDB