That might be true, but it's irrelevant. The right question to ask is, "what will make me better off after 7 years? 2 years exp -> PhD or PhD -> 2 years exp?"
I suspect PhD -> work is better, since the 2 years of industry experience will probably be at a higher level.
It really depends on the industry. There are two factors at work, speaking as an interviewer. Experience trumps everything, really. You will learn more about being a real, working programmer in one year of doing it than in 5 years of study. Remember that we're not here to write code, we're here to solve problems using code as a tool. An important tool, sure, but there is more to it than that.
Secondly a PhD is really an apprenticeship to be an academic. A PhD who is not on that track needs to have a good story as to why.
Starting in industry after a PhD doesn't put you any higher on the ladder than a fresh BSc graduate.
Starting in industry after a PhD doesn't put you any higher on the ladder than a fresh BSc graduate.
Where you enter the industrial career ladder depends mostly on the kind of experience you would get in industry, but you can get that kind of experience in a PhD program, too, possibly much faster. If you work on a large software project, collaborate with other people on software projects, plan and execute programming tasks, make presentations, and teach undergrads, you'll be hired well above the level a good fresh graduate would. Your initial position will reflect some conservative doubt about the quality of your experience and how well you will adapt to the "real world," as we rather unfairly like to put it ;-) but it will still be a significantly higher and better-paid position than a fresh grad would get, and you'll be prepared to move up quickly to a senior position. Of course, the depth of knowledge you obtained in your specialty will mean nothing, and your research skills will mean nothing to the people who hire you, but your ability to organize yourself, think methodically, and execute long-term projects will separate you from your competition and make you an obvious candidate for quick promotion.
On the other hand, if all you learn about in grad school is your research topic, and you manage to get by without developing any of the skills I mentioned above, you will indeed be starting from square one, in the same position as a 22-year-old except with less energy and less time before you die.
Starting in industry after a PhD doesn't put you any higher on the ladder than a fresh BSc graduate.
This isn't really true, at least in my experience. A quantitative PhD means you have skills - not necessarily practical programming skills, but useful skill nonetheless. A PhD can be viewed as a statistics/ML/numerics expert from day 1 - a BSc needs to be promoted to it. Additionally, spending 5 years working on hard problems means you will be a smarter person. You will interview better, you'll know more, you'll be capable of doing more.
But lets suppose PhD == BS. Which is a better place to be right now? Work experience 2003-2005, PhD 2005-2010? Or PhD 2003-2008, work experience 2008-2010? I suspect that even if the PhD is pointless, current work experience > past work experience.
I suspect PhD -> work is better, since the 2 years of industry experience will probably be at a higher level.