At the same time, I've had coworkers mention that PHP is slowly on its way out.
Simply put, NO, its not. PHP is like half the internet, with several BIG websites being run on PHP. (Facebook and Wikipedia are notable examples.)The major alternative to php is ASP (which is proprietary being the reason it hasn't really taken off). Things like GO, Perl, C#, Ruby, C++, etc. are much tougher to learn and tend to have much more difficult syntax, and therefore can be problematic to learn well enough for the average programmer to be able to deploy it efficiently. Also, some of these have inherent security issues. (For example C-derived languages tend to produce more security issues than what it's worth at times.)
Any major differences in capabilities between PHP and JavaScript?
The major disadvantage to JavaScript is that the client can read all of your code (because while you can obfuscate JavaScript, its not a complete solution, and you can't use things like .htaccess to hide the code as includes), and can even "block" your code from executing- because JavaScript is client-side not server-side. Also JavaScript is particularly prone to being used maliciously, as was seen in operation Torpedo, for example.