PHP is viewed by many as an awful, awful language. Personally, I have never viewed it that way. However, I have been considering moving away from it for performance reasons.
I have a task before me to process a file that contains 2.5 million health care claims one a monthly basis. My current system is written in PHP (5.6... because no time to migrate to 7, yet) I instinctively know that Java is much, much faster... or is it? To prove it, I put together some tests this weekend.
I generated a file consisting of 2 million "mock" claims, 6 million lines, all pipe-delimited. I wrote a Java program to just read the file, line by line. That's all. Nothing else. Very fast (don't recall the time, but less than 2 seconds). I then added in a very simply processing function to split the line into an array and count the claims. 23 seconds. Not bad, but could it be better? The split function built into Java slowed it down considerably. I wrote a faster split and got the processing down to between 3.5 and 5 seconds (not entirely consistent run after run, but acceptable.) There I had it. I was going to use Java.
Or was I?
I decided this morning to test PHP, but I had to test on version 5.6, the version my application runs on. I used the same file, and same processing. Guess what? 24 seconds to read the file and use the PHP explode function to split the line into an array. Hmm. Only one second slower than Java with the identical processing. What about PHP 7.1? I installed it on my machine and ran the script with no changes to the code. 5 to 5.5 seconds.
Now, I don't know much about the changes to the language as all I know is that my application fails miserably with it, and I haven't had time to discover all the changes I'd have to make to make it work with 7.0+. However, it's clear there's definite improvements. This test sealed it for me. So, instead of rewriting all my file processing in Java, I will likely stick with PHP and take the time to migrate to 7.1 once a few big projects are out of the way, sometime after Q1 2018.
My point in all of this is to say that there might not be a reason to move away from PHP if you don't have to. However, you might want to to expand your skillset or to pursue other employment, and those are certainly valid reasons to learn something else.