EDIT: to those downvoting this... Do you disagree with me (i.e. you think it's a good career decision to stick with a single tech stack) or do you agree but dislike that it has to be this way? Genuinely curious because I didn't think what I said was controversial at all, just industry observation/common sense.
tl;dr: always be learning.
I didn't even know PHP before I started on this journey at the beginning of the year. I was trying to peddle my (admittedly meager) Python skills but everyone who had money to pay wanted boring PHP devs to maintain and build on 7-10 year old systems, so I brushed up and landed a few nice stable gigs. Will easily clear 6 figures within the next month or so for the year.
I'm glad you're making that, but in Portland they are paying $15 an hour for PHP/MySQL/Jquery developers all day long. It's an over saturated market that peaked 10 years ago. Sure there are a few edge cases here and there but the majority of it is a swampy wordpress ghetto.
Folks who started on that stack in the 2000s (like me) and refuse to move forward aren't making 6 figures around here.
Some people enjoy developing in PHP now. And there's plenty of work there, let me tell you. And all of it that I've seen pays a lot more than chump change.
The real problem with porting most COBOL code is that few COBOL applications are actually pure COBOL, they are full of calls to proprietary middleware, databases and operating systems. For example, a lot of COBOL code runs on IBM mainframes and calls mainframe packages like CICS and IMS and the underlying mainframe OS (z/OS aka MVS). While there are replatforming solutions which emulate some of these mainframe software packages on other platforms, the emulation is generally imperfect hence there is still effort and risk in migrating.
I think the biggest problem with mainframe COBOL software is not the hardware but finding people with the right skills to maintain it. Even if you use some replatforming solution to port it to a more mainstream platform (Linux/Unix/Windows), you will still need COBOL programmers familiar with the relevant mainframe technologies, plus they'll need to understand the limitations of the replatforming solution you chose.