2016/09/15

Difference between PEAR,PECL and Composer

PECL:( PHP Extension Community Library)


PECL stands for PHP Extension Community Library, it has extensions written in C, that can be loaded into PHP to provide additional functionality. You need to have administrator rights, a C compiler and associated toolchain to install those extensions.

PEAR:( PHP Extension and Application Repository)


PEAR is PHP Extension and Application Repository, it has libraries and code written IN php. Those you can simply download, install and include in your code.

COMPOSER:


Composer is a dependency management tool in php.

--------------------------------------------------

Use case:


PEAR is soon going to be deprecated.

Using PECL you can install old php extensions, if you are not able to install those extensions from ubuntu repository.

For example your server is running ubuntu LTS 14.04 and php version is 5.3, you will not be able to install oauth by apt-get install php5-oauth. It will give error.

You can use composer in your own project to manage external libraries and dependencies. Composer has https://packagist.org/ to use different php libraries.

--------------------------------------------------

參考資料 : 

沒有留言:

張貼留言

Web 技術中的 Session 是什麼?

轉載原文:  Web 技術中的 Session 是什麼? 本文目標 在 Web 的世界裡,Session 已經是被廣泛使用的一種技術,大多數的 Web 開發者,肯定都能運用自如。在現今的各類 Web 應用程式的開發框架和工具中,Session 也已經被包裝成容易使用的模...