Can anyone name a CEO of a large company that has a PhD in computer science? Steve Jobs? dropped out of college, 'cos he famously hated the boring bits. Bill Gates? also dropped out as he felt was surrounded by people not as smart as he (based on GPA).
I've worked for companies that have amazing programmers that work on incredible systems, some of which people use every day (e.g. Windows) and others that help industries get along together (e.g. XML and SOAP). Many of these guys were self-taught and studied subjects other than Computer Science, for example Physics or Eletronic Engineering. The reason for programming in their lives was as a tool for getting their work done, rather than studying programming to learn how to do programming.
I've also worked with government and large corporations that have amazing Cambridge graduates that have had not just one, but two PhD's. These were incredibly intellectual guys who created sophisticated and elegant solutions to very specific problems in fields such as communications and signal processing. They weren't rich, nor did they have high-level jobs in their departments. It felt like they were hired as a 'boffin' and left alone to think up these solutions.
In my industry experience, there is no correlation between programming ability and the level of formal education in the computer science field. In my early days as a software engineer, I saw people promoted past me whose programming was 'not as good as mine' (IMO, of course) - but they had the social engineering skills to work out what were the right things to say to the right people and when. They didn't BS their way up - they could do the job, it's just that other skills (talking to clients, delivering on deadlines, etc) were important too, so they didn't spend 100% of their time coding like I did.
I learned an important lesson - if you have the fire within you to succeed, you'll find the solution, programming or otherwise, to the business problem in hand in order to make your company/department more successful and therefore more profitable.
Of all the programmers I've hired, I didn't care for their education track record. If they passed the programming tests and my lead engineers were happy with their abilities, the education did not matter. One of the best guys we hired was straight out of school - i.e. no degree at all.
In summary, if you're passionate about the technology and the art/science of programming itself, by all means pursue an absorbing and fascinating academic path. If you're looking to go places and be successful beyond just programming, widen your focus to include other skills such as business and psychology/sociology. Decide what you really want in 10, 20, 30 years from now and then work backwards to determine which course of action will get you to those goals.
To answer your question: a PhD is good for something really niche. It probably won't pay well, but it might be interesting.