If PHP is a product, it is far from being taken off the market, let alone scrapped. However, there are a lot of people out there who want it to go away and continue to look down on PHP, but it certainly won’t go away for a long time.

Problems with PHP

Perhaps the biggest crisis in PHP’s evolution was the PHP 6 debacle. Starting in 2005 and ending in 2010, version 6 was eventually abandoned, and the project is considered one of the greatest failures of PHP development. Five years later, PHP 7.0 was released, providing a significant performance improvement over the previous VERSION of PHP 5.6.

According to Han Tianfeng, a member of the PECL development team, PHP 7 runs on the same principle as PHP 5, and the performance improvement is mainly due to the extensive rewrite and improvement of the Zend engine. It is worth noting that Zval has improved performance, memory management, JIT open sourcing, AST introduction, etc. PHP has been making rapid and steady iterative progress thanks to the efforts of the large developer community.

Another criticism of WordPress is its scalability. WordPress has recently become synonymous with PHP, the personal blogging software that dominates most web projects.

Image from WebsiteTooltester.com. All rights reserved

Statistically speaking, wordpress is still gaining ground, and 2021 is going to be another year on the rise, making it possibly the most popular content management system in human history. The commercial value of PHP is largely tied to WordPress, with Joomla in second place only about 1/20th of that, and Drupal’s share of top developer revenue is even lower.

Server-side programming languages, PHP, accounted for nearly 80 percent, beating all other languages

Screenshots from w3techs.com

According to my research, nypost.com may be the most traffic-ridden site on wordpress, but the aggregate numbers for this site are pretty mediocre, if not downright horrible.

While WP can put media files on S3, load Balancer and CDN, configure multi-tier caching, put databases on the cloud, etc., wp’s own limitations (open source software) are the real bottleneck. I’ll talk about that later.

WordPress best practices on AWS

The picture is from AWS website, copyright belongs to the original author

All in all, wordpress is easy to get on board, but once it gets big, it can feel like it’s been hijacked. Although you can invest more in hardware to improve performance, there are bound to be some stumbling problems.

Why use PHP?

PHP is for entrepreneurs, probably best exemplified by Facebook.

Image from a 2012 latimes.com report

Startups are very sensitive to labor costs. I’ve seen startups fail with a heavy tech stack. For example, the company of a netizen does not use the Hybrid framework, but uses the native development environment, so it employs OC/Swift and Java programmers to develop iOS and Android apps at the same time, and also employs experienced people with higher salaries to lead the project. The high starting salaries for these jobs in Shenzhen put a big financial burden on start-ups and ended up being short-lived projects.

PHP has the following advantages over Java

As an interpreted language, PHP performs well (compared to other interpreted languages) and can be secure. The number of PHP programmers is very high and the average salary is relatively low. Developing a PHP application is much faster than Java (it takes much less time). PHP has a large and vibrant ecosystem, Content management systems (WordPress, Drupal, etc.), ecommerce software (WooCommerce, Magento, Opencart, PrestaShop, etc.), frameworks (Laravel, Symfony, Zend/Laminas, Yii, etc.). And there's a very active sub-ecosystem, like WordPress, where you get most of the features you want for free. It's easy to deploy and maintain, and the cost is minimal.Copy the code

It is worth noting that as projects grow, they will generally migrate to Java or Java if funding allows. Net ecology. The aforementioned Facebook even went to great pains to develop their own PHP compiler and virtual machine, and even redeveloped their own version of PHP – Hack. FB still seems to be using PHP, but it doesn’t seem to be using PHP because the code running on the server is compiled C++ code.

PHP is also for small projects.

Personal blogs, corporate image sites, forums, small and medium-sized news media, small and medium-sized e-commerce, all kinds of professional services, etc., can be easily implemented with PHP open source code. I’ve played with a handful of other languages, and PHP blows them all away in terms of simplicity.

It’s probably not possible on a small project to have all the jobs available, such as DBA, system administrator, DevOps, QA, etc. It is not possible to develop all the features, tools, middleware, languages, compilers, virtual machines…. like the FB that received the investment (e.g. HipHop/HHVM, Hack, Haystack, BigPipe, React, etc.) They have to rely almost exclusively on open source ecosystems, such as the vast number of templates and plugins in the WordPress and WP ecosystems.

The WP ecosystem has great commercial interest and value, and various third-party code can be rapidly iterated and upgraded. In general, the best-selling third-party apps are updated in a timely manner after each WP update, and you only need to wait a few days for them to be updated with the platform and tested. In a way, these third-party software development teams work with you just like your colleagues.

Open source software certainly has its drawbacks. For WP, no matter how determined you are, you should never Hack its source code. The only changes you can make are the ones you developed (plug-ins or templates).

For example, the scalability of WP, no matter how much you hate it, you can only go to the official forums or repo and make suggestions and keep pushing. Expect the next release to resolve the bottleneck on the database.

However, there are exceptions to the rule, and PHP is not impossible to do big projects. Wikipedia is written in PHP, as is the recently popular messaging app Slack, and other big projects include Flickr, MailChimp, Etsy and many more.

PHP is still strong and healthy

Well, although PHP has almost taken over the web, it continues to iterate thanks to its huge number of supporters and excellent maintainers.

After the failure of the PHP6 project, the PHP Group has clearly stepped out of the mire, releasing new releases at a very hectic pace. Now PHP8 is officially available, with two JIts and a significant improvement in performance compared to PHP7.

Constant learning and progress mean THAT PHP still has a lot of life and possibilities.

The Laravel framework is worth every PHP developer learning and mastering, and its status is a bit like Spring in the Java ecosystem.

I started with Laravel 4.2 and watched it go through the ramp-up to the current version 8, with V9 coming out at the end of 2021. There’s not just WP in the PHP world, there’s Laravel. Laravel Vapor also rode the recent Serverless wave with a large number of users on AWS.

Swoft/Swoole is a way to get your microservices projects off the hook with PHP-FPM, which has a go-like coroutine operation that allows your PHP code to live in memory. It draws on many of the strengths of Spring Cloud’s framework to put PHP on a par with other languages in the high-performance microservices space.

As an 80% web programming language, PHP is still trying to improve itself and is showing such a robust health that it’s hard to believe or even to be afraid that PHP is going to die. Advanced PHP programmers proficient in Drupal development can earn close to $100 an hour in the US, or nearly 700 RMB per hour. Meanwhile, Magento’s senior programmers are well paid.