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.