What does a PhD in computer science do for your career in software? Is it ultimately worth it?

What does a PhD in computer science do for your career in software? Is it ultimately worth it?