This article explains how to create a PHP 5.2 environment Extension (PHP Extension) in a very fast way. I hope that you can learn about the production process in a graphic way. Requirement: for example, develop an extension called heiyeluren. In the extension, enter a string in the heiyeluren_test () function, and the function returns: Your input string: xxxxx. Requirements: Understand C/C ++ programming, familiar with PHP programming environment: Download a php corresponding version of the source code, I here is the php-5.2.6, first normal installation of php, suppose our php is installed in the/usr/local/php Directory, the source code is in the/root/soft/php/php-5.2.6/, now start! Step 1: generate the extension framework cd/root/soft/php/php-5.2.6/ext. /ext_skel -- extname = heiyelurencd/root/soft/php/php-5.2.6/ext/heiyelurenvi config. when the m4 file is opened, remove dnl and obtain the following information: PHP_ARG_ENABLE (heiyeluren, whether to enable heiyeluren support, [-- enable-heiyeluren Enable heiyeluren support]) Save and quit.