I am by no means a master of PHP, but I have studied it and worked with it on several occasions. I have also studied the trends regarding the usage of PHP.
It seems that people erroneously line up to predict the demise of PHP time and time again, and are proven wrong time and time again.
The reason for this, I believe, is that there are appealing alternatives available as back-end development platforms for PHP, such as Node.js. The fact remains, however, that one area PHP will excel beyond what Node.js currently offers is in its support of transactional database applications.
The underpinnings of virtually every blog, commercial or otherwise, on the Internet, is the transactional database, supported by database engines such as MySQL, Postgresql, or commercial flagship database engines such as Microsoft SQL Server or Oracle Server. These database engines are far better supported in PHP than they are in some of its alternatives.
Another important factor, often overlooked when people ask this question, is the degree to which PHP technology is entrenched in platforms such as WordPress, arguably the most popular of all content management systems, and other very prominent platforms such as Drupal.
What are the downsides? I believe that those who often predict the end of PHP find that the way PHP is embedded in HTML is counter-productive to the separation of front-end from back-end, and that it makes HTML code far less readable. This is certainly a valid argument. I would argue, however, that given the tremendous power PHP has to offer, hastening its demise would be a disservice, and tantamount to throwing out the baby with the bath water. Furthermore, with its current entrenchment in the world of back-end development, despite promising newer technologies, such as Node.js, it is highly unlikely that we will be seeing PHP’s demise any time soon.
In fact, PHP developers are still in high demand—especially those who are well-versed in the integration of the front-end with the back-end, i.e., full stack developers.
PHP might have a higher learning curve than Node.js, and lacks the advantage that the same language is used for both the front- and back-end, but I am convinced it remains a very good back-end programming language.