In-depth PHP kernel 2 (scalability)

Source: Internet
Author: User

To sum up, external modules are very suitable for third-party products, and are rarely used for additional small functions or debugging purposes. To quickly develop some additional functions, external modules are the best way. However, for some frequently used and implemented,CodeFor more complex applications, the loss is worth the candle.

Third parties may consider using extension labels in the PHP. ini file to create a new external module. These external modules are completely separated from the main PHP package, which is very suitable for some commercial environments. Commercial publishers can send only these external modules without creating additional Php binary code that is not allowed to bind these commercial modules.

Built-in modules

The built-in modules are directly compiled into PHP and coexist in every PHP Processing request. Their functions take effect immediately when the script starts to run. Like external modules, built-in modules have their own advantages and disadvantages. The list is as follows:

Advantages

Disadvantages

Manual loading is not required, and the function takes effect immediately.

Modify the built-in module and re-compile PHP.

No additional disk files are required. All functions are built into the PHP binary code.

PHP binary files become larger and consume more memory.

ZendEngine

Of course, you can also expand it directly in the Zend engine. If you need to make some changes to the language features or have some special features built into the language core, this is a good way. However, we should try our best to avoid any modifications to the Zend engine. This change will cause incompatibility with other code, and almost no one will be able to adapt to the Zend engine with special patches. Besides, these changes are related to the main PHPSource codeIs inseparable, so it is possible to be overwritten in the next official source code update. Therefore, this method is often considered a "bad habit ". This chapter will not repeat this because it is rarely used.

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.