פרק 27. Source Layout

תוכן העניינים :
Extension Conventions
Macros
Memory Management
Directory and File Functions
String Handling
Complex Types

הערה :

After extracting the PHP archive , you ' ll see a directory layout similar to that in תרשים 27-1 .

תרשים 27-1 . Main directory layout of the PHP source tree .

php-4
ext In PHP 4.0 , it' s possible to compile these standard extensions as dynamic loadable modules (at least , those that support it ) .
pear Directory for the PHP class repository . At the time of this writing , this is still in the design phase , but it ' s being tried to establish something similar to CPAN for Perl here .
sapi
TSRM
Zend Location of Zend' s file ; here you'll find all of Zend's API definitions , macros , etc . (important ) .

You should also follow some sub-inclusions from these files; for example, the ones relating to the Zend executor, the PHP initialization file support, and such. After reading these files, take the time to navigate around the package a little to see the interdependencies of all files and modules - how they relate to each other and especially how they make use of each other. This also helps you to adapt to the coding style in which PHP is authored. To extend PHP, you should quickly adapt to this style.

Extension Conventions