I have very high job security and a salary that's a bit lower than a coder/consultant starting salary. Also, my work is much more interesting (to me) than what it would have been out there. It's a great deal for me, but YMMV.
You mean for a "normal" (if I may) industry job or for doing a PhD within the industry?
Because before starting my PhD, the salaries that I've been proposed by recruiters from various companies were more like the double (and sometimes more, like with Google or high frequency trading firms) of what I'm making as a PhD student (but for a way less fun job, as you say).
That's around ~44.000 Euros per year (including perks).
I interviewed in 4 companies before deciding to go for the PhD (all engineering jobs). The salaries varied from 45.000 to 55.000 Euros brutto per year, with one offer at 60.000 Euros.
Friends working in industry make around 50.000 Euros which matches with my experience. Making a bit less for working in _your_ PhD is a really good deal here. If you find the right PhD for you it can be very gratifying (plus you are working for yourself). OTOH my friends in industry work way less hours than I do, so if I had a family I would probably had never gone the PhD way.
The law actually states the minimum salary for a PhD student. It is approximately 1650€ "brut" (before social taxes) which amounts to 1350€ "net" (what you actually get each month). If you have a "mission d'enseignement" (teaching hours), which is not mandatory, then you have to be teaching for 64 hours per years (that is not counting the time you spend preparing for the course or the time spent correcting students assignments of course) and should not occupy more than 1/6 of your working time. Your salary is then 2000€ "brut", which amounts 1650€ "net".
Public PhD funding almost always stays at this level of salary. However you can be paid more than this, for instance if you are paid on a project grant money or if you are in CIFRE (which means you are paid by a company for which you have to spend a defined part of your time, this is often but not always incompatible with having a "mission d'enseignement"). But then your a lot less free to do whatever you want (since the project or the company mst of the time have strongly fixed goals).
But no I did meant student status, which means most museums are free for instance, and discounts for many things such as public transportations, movie theaters, etc.
In Sweden it's the latter, so students are employed as PhD students and get a salary (though usually not very competitive compared to what you would make if working elsewhere).
The fact that the PhD students spend a lot of time teaching and not only educating themselves and working towards their thesis is what makes take around 5 years, rather than, say 3 years.