If you had to use PHP, then you have used and expanded. With few exceptions, every function available for use in PHP is grouped into one or another extension. The main part of the functions (over 400) included in the standard extension. PHP source code distributed with about 86 extensions, which have about 30 features in each. Believing get somewhere 2500 functions in total. If this is not enough, PECL repository offers more than 100 additional extensions, even more can be found in the vast expanses of the Internet.
The material presented in this article assumes familiarity with the language itself as PHP, as well as with the language of the interpreter written in PHP: C.
To begin with, we define the reasons for which you want to write an extension for PHP:
- The existence of any specific library or call the OS, which can not be made from PHP directly because of the level of abstraction adopted in the language;
- You want to get PHP to work non-standard way;
- Do you already have the solution written in PHP, but you know that it can be faster, more compact and consume less memory during operation;
- Do you have a special code that you would like to sell. However, it is important that the buyer could run your code, but do not see the source code.
All of the above reasons are quite adequate, but by creating the extension, you should first understand that this is primarily expansion.
Creating Extensions PHP: Introduction to PHP and Zend
Always wanted to write an extension to PHP, but as it broke was to seek information. But here in Russian, and even painted it very well. Definitely credit comrades krestjaninoff





