PHP is currently the most used server-side language currently in use, with 82.1% of the websites currently online using it. Even though it has its quirks, we are going to focus on why PHP is a language that is not going to die in the coming years.
1. It's the easiest of all.
Out of all the programming languages out there, PHP is most probably the easiest one to use. It is simple to learn, easy to install and is the quickest at getting things done. Beginners will be able to build a simple website from scratch in a matter of hours. It also goes very well with HTML for fully featured and designed websites. The documentation is also very complete and holds answers to many of your questions.
2. It has a large community.
Even if a lot of people rant about PHP, it has a very large favorable community. If you have a question and you can't find an answer through Google, the tag PHP has been used over 695.000 on Stack Overflow, and that number grows by the minute. There is usually always someone who experienced the same problem as you and therefore will have an answer for you.
3. The CMS market
When talking about PHP and websites, the first thing that comes to mind is WordPress. This easy-to-use Content Management System represents nearly a quarter of the web (23.3%) and is the most used CMS currently out there, and is written in PHP. Why build a site from scratch when you have so many systems that are free to use? Ranging from blogs (WordPress) to fully featured e-commerce websites (Magento/Prestashop), there has to be the CMS perfect for you.
4. The libraries
If you don't want to use a CMS for your website, starting from scratch can be a long process, and you might end up rebuilding the wheel. Once again, the PHP community has you covered. There are a lot of libraries (including some built from the PHP team itself) out there for pretty much anything you need. It is also easy to get libraries through Git.
5. It's kept up to date
The PHP team is working actively to upgrade and update PHP on a daily basis. There are very few bugs with the language, and when some are found they are usually quickly patched up. There is usually a patch every month for versions 5.4, 5.5 and 5.6 of PHP. As with any other type of software, it is recommended to keep your version of PHP up-to-date to avoid getting unnecessary bugs and issues and to protect your site against infiltration using these bugs.