If you are short on time you can skip to the summary.
The very first thing you need to do is ask yourself, why do I want a PhD. The goal of a PhD is to enhance the scientific body of knowledge in their field, by doing research. All throughout the PhD process your focus will be on understanding what others have done and what tiny little problem can you work on, that will bring some type of enlightenment to your field. So for example, my PhD is in Computer Science (CS). I spent the first few years in course work but my final 2 years I took 0 courses and spend all of my time reading scientific papers trying to understand my chosen field and how I might contribute. Ultimately, my dissertation research explored the question of what affect does a multimodal interface have on the ability of an operator to control multiple robots. Thus, my contribution to the field of Human Robot Interaction was on understanding the cons/benefits to adding speech and other modalities to operator user interfaces.
I say this to say that you need to understand the goal of a PhD so that you can understand future career opportunities. A PhD should be trying to push the scientific boundaries by looking for unanswered problems or applying research to address problems, e.g. Psychologist, Public Policy. Now there are plenty of people who get a PhD but have no wish to do research or apply research in novel ways. This to me does not make much sense because the purpose of a PhD is to do research, thus the reason every PhD has a dissertation.
Finally, to your question of opportunities. A PhD will close opportunities and at the same time open new ones. Your goal, if you so choose to get a PhD, is not to look for a leg-up on entry level positions (if this is your goal than stop at a Master’s degree). Your goal is to secure a position that allows you to do/apply research. So using my field of CS as an example. I interviewed at a number of locations e.g. Microsoft, Dow, a research lab at Lockheed Martin, Boeing, and a number of other places. In some of these places they were more interested in my ability to program (they thought a PhD meant I would be a great programmer) and in others they were interested in my ability to do research (find unsolved problems and solve them). Without a PhD I would not have been interviewed for research positions at locations such as the Naval Research Lab, Microsoft, Lockheed Martin, NASA. However, I was not a good fit for Dow, Boeing and others because they wanted software development and not research.
Finally, as for pay. You can get paid a lot for doing research. My starting salary, as a PhD, working in an Industry lab doing research was 6 figures. The Taulbee survey gives the salary for research faculty and in CS the current average starting salary for junior faculty at public universities is around 95k for 9 months or 127k for 12 months. This is for CS and other Engineering disciplines. Similarly, a master’s degree and similar years of experience could put you in the same range so don’t let salary be your deciding factor.
SUMMARY: A PhD will close doors, but to careers that are not of interest if your goal is to do research. A PhD will open new opportunities to companies interested who do research e.g. Oil companies, Tech Companies, Government Research Labs, Defense Industry etc. Ultimately you need to decide what your goals are - if it is to learn or master a craft than stop at a Master’s and learn on your own; If however, you like to explore the unknown, are unafraid of failure, don’t mind occasionally being ridiculed by your peers, all for the sake of generating knowledge than PhD may be for you.
Here are some links on why get a PhD (or why not). Many of these links point toward becoming a professor since that is often a place where you can do research, however it is not the only place.