Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PEAR
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Repository of PHP software code}} {{other uses|Pear (disambiguation)}} The '''PHP Extension and Application Repository''', or '''PEAR''', is a repository of [[PHP]] software code. [[Stig Bakken|Stig S. Bakken]] founded the PEAR project in 1999 to promote the [[code reuse|re-use]] of code that performs common functions. The project seeks to provide a structured [[library (computer science)|library]] of code, maintain a system for distributing code and for managing [[code package]]s, and promote a standard coding style. Though community-driven, the PEAR project has a PEAR Group which serves as the governing body and takes care of administrative tasks. Each PEAR code package comprises an independent project under the PEAR umbrella. It has its own development team, versioning-control and documentation. ==PEAR packages== A PEAR package is distributed as a [[gzip]]ped [[tar file]]. Each archive consists of source code written in [[PHP]], {{citation needed span|text=usually in an [[object-oriented]] style|date=July 2015}}. Many PEAR packages can readily be used by developers as ordinary third party code via simple include statements in PHP. More elegantly, the PEAR [[package manager]] which comes with PHP by default may be used to install PEAR packages so that the extra functionality provided by the package appears as an integrated part of the PHP installation. Unlike the [[CPAN|Comprehensive Perl Archive Network]] (CPAN) archives, {{citation needed span|text=which PEAR took as its model|date=July 2015}}, PEAR packages do not have implicit dependencies so that a package's placement in the PEAR package tree does not relate to code dependencies. Rather, PEAR packages must explicitly declare all dependencies on other PEAR packages. The PEAR base [[class (computer science)|class]]es contain code for simulating [[Object-oriented programming|object-oriented]] [[destructor (computer science)|destructor]]s and consistent error-handling. Packages exist for many basic PHP functions including [[authentication]], [[web cache|caching]], database access, [[encryption]], configuration, [[HTML]], [[web services]] and [[XML]]. PEAR means βPHP Extension and Application Repository.β It is a framework and distribution system for reusable PHP components. It extends PHP and gives a higher level of programming for all web developers. PEAR is divided into three different classes that are: PEAR Core Components, PEAR Packages, and PECL Packages. The PEAR Packages include functionality giving for authentication, networking, and file system features and tools for working with HTML and XML templates. == PEAR package manager == The PEAR package manager provides a standardized way to install, uninstall, or upgrade with new PEAR packages or PECL extensions. Before installing a package it can also be instructed to take care of package dependencies so all the extra needed packages are installed too. The PEAR package manager is run from the command line using the <code>pear</code> command. Usually it is therefore only the server administrator who can alter the installed base of PEAR and PECL extensions. On PHP installations running on Linux, the PEAR package manager is ready for usage by default, but on Windows the PEAR package manager is only available after running a [[batch file]] called <code>go-pear.bat</code>. == PEAR2 Pyrus == With Pyrus an attempt was undertaken to redesign and improve PEAR from the ground up for PHP 5.3 or newer.<ref>{{Cite web |url=https://pear2.php.net/PEAR2_Pyrus |title=PEAR2_Pyrus - PEAR2 |access-date=2016-12-12 |archive-url=https://web.archive.org/web/20170110094110/http://pear2.php.net/PEAR2_Pyrus |archive-date=2017-01-10 |url-status=dead }}</ref> Pyrus can be used to install packages from PEAR channels. The last release is from March 2011 and its development might have been discontinued due to the popularity of Composer.<ref>{{Cite web|url=https://stackoverflow.com/questions/34199824/what-is-the-difference-between-pear-and-composer|title=PHP - What is the difference between PEAR and Composer?}}</ref> == PEAR and Composer == With [[Composer (software)|Composer]] there is an alternative available for managing packages for a PHP project. Composer also supports the installation of PEAR packages.<ref>{{Cite web|url=https://getcomposer.org/doc/05-repositories.md#pear|title=Repositories - Composer}}</ref> Some people {{By whom|date=September 2020}} of the PHP community argue for replacing PEAR in favor of composer.<ref>{{Cite web|url=http://fabien.potencier.org/the-rise-of-composer-and-the-fall-of-pear.html|title = The rise of Composer and the fall of PEAR |Articles - Fabien Potencier}}</ref> <ref>{{Cite web|url=https://thephp.cc/articles/blast-from-the-past|title = Blast from the Past - Is PEAR still relevant?}}</ref> ==PECL== The PHP Extension Community Library (PECL), (pronounced 'pickle'<ref>{{Cite web|url=https://pear.php.net/manual/en/about.pear.php|title=Manual :: What is PEAR?|website=pear.php.net|access-date=2017-03-21}}</ref>) is conceptually very similar to PEAR, and indeed PECL modules are installed with the PEAR Package Manager. PECL contains [[C (programming language)|C]] extensions for compiling into PHP. As C programs, PECL extensions run more efficiently than PEAR packages. PECL includes modules for XML-parsing, access to additional databases, mail-parsing, embedding [[Perl]] or [[Python (programming language)|Python]] in PHP scripts and for compiling PHP scripts. PECL spun off from the PEAR Project in October 2003. Originally it was called the PEAR Extension Code Library, but it now operates independently of PEAR.<ref name="pear-news20031015">{{cite web |url=https://pear.php.net/news/pecl-split.php |title=Own infrastructure for PECL |last=Jansen |first=Martin |date=2003-10-15 |df=mdy |department=News |website=[[PEAR]] |publisher=PEAR Website Team |access-date=2023-02-28 |quote=PECL, formerly known as PHP Extension Code Library, has been renamed to PHP Extension Community Library. |url-status=bot: unknown |archive-url=https://web.archive.org/web/20230228205534/https://pear.php.net/news/pecl-split.php |archive-date=2023-02-28 }}</ref> PECL extensions are documented alongside standard extensions within the PHP Manual, so there is no special manual for PECL extensions. Also, several{{examples|date=July 2015}} extensions began their development cycle in PECL and ended up in core (the distributed PHP source) and in many{{examples|date=July 2015}} of these cases the PECL versions become unmaintained. ==See also== *[[Composer (software)]] ==References== {{Reflist}} == External links == * [http://pear.php.net The PEAR Project] * [http://pecl.php.net The PECL Project] {{PHP}} {{Application frameworks}} {{Package management systems}} [[Category:PHP software]] [[Category:Web frameworks]] [[Category:Archive networks]] [[Category:Free package management systems]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Application frameworks
(
edit
)
Template:By whom
(
edit
)
Template:Citation needed span
(
edit
)
Template:Cite web
(
edit
)
Template:Examples
(
edit
)
Template:Other uses
(
edit
)
Template:PHP
(
edit
)
Template:Package management systems
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)