Differences between PHP extension modules Pecl, Pear, and Perl

Source: Internet
Author: User
This article mainly introduces the differences between the PHP extension modules Pecl, Pear, and Perl. For more information, see

This article mainly introduces the differences between the PHP extension modules Pecl, Pear, and Perl. For more information, see

I. Brief summary:
Pear: A relatively standard for writing, a popular toolbox code set in Foreign Countries
Pecl: php extension package, but not included in the basic extension scope of php
Perl: a scripting language that appeared earlier than php. php draws on its regular expression section.

Ii. Pear and Pecl are all collections of PHP extension modules. Is two ways to expand PHP:


A. Use pure PHP code to Write Functions and classes.
Pear is such a project. PEAR is the official open-source PHP class library (abbreviation of PHP Extension and Application Repository ). Pear indicates a Pear in English. PEAR compiles common functions in PHP program development into class libraries, covering page presentation, database access, file operations, data structures, cache operations, network protocols, and many other aspects, you can use it easily. It is a code repository for PHP extensions and applications. In short, PEAR is the cpan of PHP. Its homepage is pear.php.net.


B. Use c or c ++ to compile external modules and load them to php.
Pecl (The PHP Extension Community Library) Does this. The standard Extension of PHP can supplement The functions required in actual development. All extensions need to be installed and appear in the form of DLL in Windows. In linux, they need to be compiled separately. The format is written in C language according to official PHP standards, although the source code is open, most people cannot change the source code at will. The main page is pecl.php.net.
The most direct expression: Pear is the upper-layer extension of PHP, and Pecl is the underlying extension of PHP.
Both methods provide ready-made functions or classes for specific applications, which are essentially the same.

Iii. Differences between PEAR, PECL and Perl

PEAR is the abbreviation of the PHP Extension and Application Repository. It is a code repository for PHP extensions and applications. In short, PEAR is the CPAN of PHP.
PECL (PHP Extension Community Library), a PHP Extension Library, which provides a series of known Extension libraries written in C ++ and other languages, most of them are in the form of Dll (Dynamic Link Library), which is faster than PEAR. However, unlike PEAR, PECL needs to be configured on the server and registered to the host.
Perl (Practical Extraction and Report Language) was originally designed by Larry Wall, which was published in December 18, 1987. Perl uses the features of C, sed, awk, shell scripting, and many other programming languages. The most important feature is that it integrates the Regular Expression Function and a huge third-party code library CPAN. In short, Perl is as powerful as C and as convenient as script descriptive languages such as awk and sed. Perl is generally referred to as the "Practical Extraction and Report Language". You may also see "perl", where all letters are in lowercase. In general, "Perl" has uppercase P, which refers to the language itself, while "perl" and lower-case p refer to the interpreter for running programs.

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.