Brief comment on the disadvantages of using PHP to develop large systems (1) _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Briefly evaluate the disadvantages of using PHP to develop large systems (1 ). Over the past four years, I have been committed to developing PHP applications. PHP is indeed very easy to write. However, PHP also has some very serious defects. I will give my reasons as to why I have been working on PHP application development for the past four years. PHP is indeed very easy to write. However, PHP also has some very serious defects.

Next I will give my own reasons why PHP is not suitable for websites larger than small and amateur websites.

1. poor support for recursion

Recursion is a function calling mechanism. This is a powerful feature that can make some complicated things very simple. A recursive example is quick sort ). Unfortunately, PHP is not good at recursion. Zeev, a PHP developer, said: "PHP 4.0 (Zend) uses stacks instead of heaps for intensive data. That is to say, the number of recursive functions that it can tolerate is significantly less than that of other languages ." See bug 1901. This is a bad excuse. Every programming language should provide good recursive support.

2. many PHP modules are not thread-safe

A few years ago, Apache released the Web server version 2.0. This version supports multi-threaded mode. In this mode, one part of the software can run multiple at the same time. The inventor of PHP said that the core of PHP is thread-safe, but not necessarily non-core modules. But nine times in ten times, you want to use this module in the PHP script, but this makes your script not suitable for the Apache multithreading mode. This is why the PHP team does not recommend running PHP in the multi-threaded mode of Apache 2. Poor multi-threaded mode support makes PHP often considered one of the reasons why Apache 2 is still not popular.

Please read this discussion:

Bytes. PHP is indeed very easy to write. However, PHP also has some very serious defects. The author will give his own reasons for the following...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.