Because it's not cool. But not being cool doesn't mean it's not good. It's actually very good. In some contexts people will give you strange looks if you say that you code in php. If you live amongst hipsters, I guess its time to move on, if not I guess you'll be just fine with php.
Given that PHP 7.1 is already faster than Java, dozens of times faster than Ruby or Python, and is only really beaten in market on performance by node.js... I wonder what in blazes would put that notion in your head unless you wanted to transition to compiled languages...
... and given how unsuited compiled languages tend to be for doing web development, that would be the breaking point.
Do you want to build something OTHER than websites? Then it's time to move on from PHP.
If you're building web technologies PHP remains the best choice since it's available on damned near every host out there, has seen massive performance improvements in recent years that puts other languages to shame i[/i], and is probably one of the better documented languages -- what with php.net putting most other language documentation to shame!
Even if PHP does have a lot of faults -- like how it bleeds scope so easily, has no secure method of code passing, etc, etc.
But I wouldn't abandon it unless I wanted to build native applications, desktop applications, basically anything that isn't spitting up HTML.
When PHP is no longer the best solution for the problem.
Most apps can be built in most languages, from PHP to JS to Ruby. It comes down to:
When it came time to build an API, I chose JS over PHP because of how easy it was to get Node/Express up and running vs an opinionated framework like a Slim.
And when I need to prototype a concept quickly, I often pick PHP, as I can control the server and front end more easily than say JS.
It's all your personal preference mixed with circumstances of the project. There's no need to abandon PHP if you enjoy using it, there's plenty of developers using PHP7, Composer, and all that jazz. And it's always cool to challenge yourself too and break out of any mold you've grown into.
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.
The less code you use, the less there is to break
Ryosuke
Designer / Developer / Influencer
Adrian Patrascu
It depends on type of the WEB you build (website, web application, web service ...).
If you are going to build web services you should switch to NodeJS or Ruby as fast as you can.
You still can do web applications with PHP but it is recommended to switch to something else.
It will depend also on your hosting platform (few hosting providers offers something else than PHP), you may require VPC or docker to run your NodeJS/Ruby apps.
Generally it is a good idea to learn something else, but ultimately is related to your actual "market" or what do you sell.
If you will need to chose something else, take a look at NodeJS and Angular or React.