The author has been committed to the development of PHP applications for the past four years. PHP is really easy to write. But PHP also has some very serious flaws.
The author below will give my own reasons why PHP is not suitable for websites larger than small amateur websites.
1. Poor support for recursion
Recursion is a mechanism by which a function calls itself. This is a powerful feature that can turn something complex into something very simple. An example of using recursion is quicksort. Unfortunately, PHP is not very good at recursion. Zeev, a PHP developer, said: "PHP 4.0 (Zend) uses a stack approach for dense data rather than a heap approach. This means that the number of recursive functions it can tolerate is significantly less limited than other languages." See bug 1901. This is a very bad excuse. Every programming language should provide good recursion support.
2. Many PHP modules are not thread-safe
A few years ago, Apache released version 2.0 of the web server. This version supports multi-threading mode, in which one part of the software can run multiple parts at the same time. The inventor of PHP says that the core of PHP is thread-safe, but non-core modules may not be. But nine times out of ten, you want to use this module in a PHP script, but this makes your script incompatible with Apache's multi-threaded mode. This is why the PHP team does not recommend running PHP in Apache 2's multi-threaded mode. PHP's poor multi-threaded mode support is often cited as one of the reasons why Apache 2 remains unpopular.
Please read this discussion: