Deep understanding of PHP source directory structure and function description _php tips

Source: Internet
Author: User
Tags pear php database php programming php regular expression sapi zend

This article describes the PHP source directory structure and functional description. Share to everyone for your reference, specific as follows:

PHP is the first in the Web development language, not only because of the simple syntax, easy to get started. I personally think more because of the language itself: the scalability of the module, maintainability and memory security management characteristics. Programmers who write PHP don't necessarily know: how does PHP do it? What is the role of the directory of organizational structure? If you know something about it, you'll get a deeper understanding of PHP, and the code you write will be more efficient and robust ...

1. build and compile-related directories.
2. ext Extension Library code, such as MySQL, zlib, iconv, etc. we are familiar with the extension library. The standard set of functions is commonly used in the/ext/standard/directory.
3. Main Main directory contains the major PHP macros and definitions.
4. SAPI and a variety of server interface calls, such as Apache, IIS, etc., also contains the general fastcgi, CGI and so on.
5. Win32 and Windows compile PHP-related scripts.
6. Zend folder core engine, all Zend API definitions and macros.
7. Scripts Linux under the script directory.
8. tests test script directory
9. SAPI The interfaces of various WEB servers.
tsrm Zend and PHP's thread Security Explorer (TSRM) directory.
Pear This directory is the "PHP extension and Application Warehouse" directory. Contains the core files of pear.

Several of these important documents are definitely worth your time to understand:

Php-src/main/php.h, located in the PHP home directory. This file contains most of the PHP macros and API definitions.

Php-src/zend/zend.h, located in the Zend home directory. This file contains most of the Zend macros and API definitions.

php-src/zend/zend_api.h, also located in the Zend home directory, contains the definition of the Zend API

More interested in PHP related content readers can view the site topics: "PHP Math Arithmetic Skills summary", "PHP operation Office Document Skills Summary (including word,excel,access,ppt)", "PHP Array" operation Skills Encyclopedia, " Summary of the PHP sorting algorithm, "PHP commonly used traversal algorithm and skills summary", "PHP Data structure and algorithm tutorial", "PHP Programming Algorithm Summary", "PHP Regular Expression Usage summary", "PHP operation and operator Usage Summary", "PHP string (String) Usage summary" and " A summary of common PHP database operations tips

I hope this article will help you with the PHP program design.

Related Article

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.