PG has a Ph.D; he did fine (yay anecdote). In my various internships around tech companies, there were plenty of senior coders who had Ph.Ds. And if you have a Ph.D in a relevant niche, you're probably going to be headhunted and well sought after. Where else does Wall Street or Google hire top machine learning specialists?
Now a Ph.D in sociology on the other hand... where do you go from there?