interviewer ask me a quetion what is peer can any body tell me in terms of php what it means to peer?

Dani AI

Generated

As guessed, the interviewer most likely meant PEAR (the PHP package ecosystem) rather than the everyday word “peer.” For practical learning: basic PHP will let you use many packages, but familiarity with object‑oriented PHP, the command line (CLI), and how autoloading works will make installing and integrating packages much smoother. PHP: The Right Way explains why autoloading and a dependency manager matter for modern projects. (phptherightway.com)

Quick way to get started on a Linux/Ubuntu dev box: install the distribution package and use the pear command. Example:

sudo apt-get update
sudo apt-get install php-pear
pear install Package_Name
pear list

Ubuntu’s documentation shows this workflow and how installed PEAR files appear on the system. (help.ubuntu.com)

If a host won’t let you install system‑wide, PEAR can be installed locally in your home directory and PHP’s include_path adjusted so your code finds the libraries. Many hosts and tutorials cover a local PEAR install and the minimal config changes needed to use packages from a shared account. (php.cn)

Important modern note (ties back to and ): Composer is now the standard dependency manager for PHP — it handles versioning, autoloading, and per‑project installs. For new projects it’s usually better to learn Composer (composer require vendor/package + require 'vendor/autoload.php';). Composer can also be used to consume some PEAR code when needed (see the Composer docs and migration notes). Composer docs and PHP: The Right Way have clear examples. (getcomposer.org)

Troubleshooting tips: check pear config-show / pear list for installation state, ensure PHP CLI and correct PHP version are used, watch package last‑updated dates (some PEAR packages are old), and prefer Composer/PSR‑style libraries for new work.

Recommended Answers

All 13 Replies

a member of a nobility; nobleman

If it is PHP related, can't it be the question was about PEAR instead of peer?

If it is PEAR, then PEAR is a framework and distribution system for reusable PHP components. PEAR = PHP Extension and Application Repository

If it is referring to peer as in group of people in the society, sophiaya is correct, and also someone belonging to the same group based on group, age, job as in programmers, and etc... it can be based on equal standing or status within group of people or workgroup..

PEAR is short for "PHP Extension and Application Repository" and is pronounced just like the fruit

The purpose of PEAR is to provide:

• A structured library of open-sourced code for PHP users
• A system for code distribution and package maintenance
• A standard style for code written in PHP
• The PHP Extension Community Library (PECL)
• A web site, mailing lists and download mirrors to support the PHP/PEAR community

thankyou to all for replying
@oop php yes it pear i am littel confuse about spelling

so how can we start to work in pear with php any extra things required for that or knowlagde of core php is enough

pear can be used as a database abstraction layer to accomodate different types of databases. However, the Zend Engine II enterpreter were already package with PDO (PHP Data Objects), which can perform the work aimed by the PEAR developers.

PEAR extensions and classes were also used in eCommerce applications. However, at this very moment I don't see feasible use of it. PHP have gotten really advance, and besides if it is just a calendar, sales reports I have to make, there are other solutions like jquery..

For the purpose of database abstraction, I would definitely use PDO than heading for the PEAR abstraction layer or mysqli.

Member Avatar for Member #120589

PEAR can be extremely useful for developing functionality that's not built into core PHP. They are like plug-ins to an extent and should work out of the box. The package code is standardised and there should be documentation on each one. A quick visit to the package page: http://pear.php.net/packages.php should give you an idea of what's currently available.

However, as pointed out, you may find better options out in the wild. One really nice site is phpclasses: http://www.phpclasses.org/ and also googlecode: https://code.google.com/hosting/search?q=label%3aPHP

If you're a dedicated Windows user without much experience of UNIX, DOS or the cmd window, you may find installing new PEAR packages a bit confusing. However, read the documentation and you should be ok :)

In addition, local PEAR packages that you use aren't always available on host. Depending on your hosting deal, you may be able to install these packages. You can however usually fiddle the pear packages as include files (can be tricky) so that they can be made to work even if you can't install them via PEAR on the host.

I think the person speaking to you pronounced it wrong, he/she probably meant "PEAR".

thankyou all to giving me such a wonderfull knowledge

Do you have any other questions about PEAR?

@diafol
so what things needed to learn php and pear oop php is required and,
is pear compatible with framworks?
what are the essential requirment to learn this thing and what kind of help we get in our project when using pear

Member Avatar for Member #120589

PEAR usually consists of class(es), which should slip in seemlessly with other php functions and constructs. TBH I can't remember using them with frameworks, but I can't see why it/they wouldn't be compatible.

As I mentioned, documnetation exists for each package and it's usually comprehensive. This is down to the strict requirements set by PEAR. Just be aware that some PEAR packages have dependencies, i.e. they may depend on other packages being installed.

PEAR has an external support forum: http://forums.codewalkers.com/pear-packages-47/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.