Home php教程 php手册 PHP扩展模块Pecl、Pear以及Perl的区别

PHP扩展模块Pecl、Pear以及Perl的区别

Jun 06, 2016 pm 08:23 PM
pear pecl perl php

这篇文章主要介绍了PHP扩展模块Pecl、Pear以及Perl的区别,需要的朋友可以参考下

一、简短总结:
pear:一个书写的比较规范,国外较流行的工具箱代码集
pecl:php扩展包,但不属于php基本扩展范围
perl:一种早于php出现的脚本级语言,php借鉴了他的正则表达式部分

二、Pear、Pecl都是PHP扩展模块的集合。是扩展PHP的两种方法:


A.一种是用纯粹的PHP代码写函数和类。
Pear就是这样一个项目。PEAR是PHP的官方开源类库(PHP Extension and Application Repository的缩写)。Pear在英文中是梨子的意思。PEAR将PHP程序开发过程中常用的功能编写成类库,涵盖了页面呈面、数据库访问、文件操作、数据结构、缓存操作、网络协议等许多方面,用户可以很方便地使用。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR就是PHP的cpan。其主页是pear.php.net。


B.另外一种是用c或者c++编写外部模块加载至php中。
Pecl(The PHP Extension Community Library)就是干这个事的,PHP的标准扩展,可以补充实际开发中所需的功能。所有的扩展都需要安装,在Windows下面以DLL的形式出现;在linux下面需要单独进行编译,它的表现形式为根据PHP官方的标准用C语言写成,尽管源码开放但是一般人无法随意更改源码。其主页是pecl.php.net。
最直接的表述:Pear是PHP的上层扩展,Pecl是PHP的底层扩展。
这两种方法其实都是为特定的应用提供现成的函数或者类,本质上来说都是一样的。

三、PEAR, PECL和Perl的区别

PEAR是PHP扩展与应用库(the PHP Extension and Application Repository)的缩写。它是一个PHP扩展及应用的一个代码仓库,简单地说,PEAR就是PHP的CPAN。
PECL (PHP Extension Community Library),PHP的扩展库,,它提供了一系列已知的扩展库,由C++等其他语言编写而成,多数以Dll(动态链接库)的形式体现,为比PEAR更快,但是与PEAR不同的是,PECL需要在服务器上配置并被注册到主机中。
Perl (Practical Extraction and Report Language)最初的设计者为拉里·沃尔(Larry Wall),他于1987年12月18日发表。Perl借取了C、sed、awk、shell scripting以及很多其他程序语言的特性。其中最重要的特性是它内部集成了正则表达式的功能,以及巨大的第三方代码库CPAN。简而言之,Perl象C一样强大,象awk、sed等脚本描述语言一样方便。Perl 一般被称为“实用报表提取语言”(Practical Extraction and Report Language),你也可能看到“perl”,所有的字母都是小写的。一般,“Perl”,有大写的 P,是指语言本身,而“perl”,小写的 p,是指程序运行的解释器。

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

See all articles