Quickly develop a PHP extension-PHP Tutorial-php Tutorial

Source: Internet
Author: User
Quickly develop a PHP extension. This article quickly explains how to create a PHP5.2 environment extension (PHPExtension ), I hope that I can help my friends who want to learn more quickly by text. This article explains how to create a PHP 5.2 Environment Extension (PHP Extension) in a very fast way ), I hope that the production process can be understood by anyone who wants to learn quickly in the form of text and text.

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 and be familiar with PHP programming.

Environment: Download a php corresponding version of the source code, I here is the php-5.2.6, the first normal installation of php, assuming that our php installed in the/usr/local/php Directory, source code in/root/soft/php/php-5.2.6/, now start!

Step 1: generate an extension framework

CDS/root/soft/php/php-5.2.6/ext

./Ext_skel -- extname = heiyeluren

Cd/root/soft/php/php-5.2.6/ext/heiyeluren

Vi config. m4

After opening the file, remove dnl and obtain the following information:

PHP_ARG_ENABLE (heiyeluren, whether to enable heiyeluren support,

[-- Enable-heiyeluren Enable heiyeluren support])

Save and exit.

The Extension of the runtime 5.2 Environment (PHP Extension), hoping to let friends who want to learn quickly learn about production in the form of text...

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.