A very good friend started an outsourcing firm here in Mexico 10 years ago. We (mexicans) were the cheaper alternative for US companies building software solutions.
Well, a couple of years ago they outsourced a lot of jobs from Mexico to Vietnam, because they were 1/3rd of the cost of a software dev in here . We were Out-Outsourced!
It's the fact of the market, and will continue unless the US government intervenes somehow.
I have been on the "lucky" receiving side of the issue. I've worked remotely for several US companies. They pay half of a US Director/VP of Eng for one; And I earn 3x the normal Mexico salary.
And as you say, right now , it doesn't make sense to pay US salaries for PHP development. Shit, I've outsourced Sr. QA automation to Argentina at $10 usd the hour (via upwork).