PEAR: is it really necessary?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all,

I've been using PHP for a while now but I haven't actually used PEAR. I
have just read half a chapter in a book, it sounds alright but haven't
actually used it. I was just wondering, is it really necessary to use
PEAR? I usually get things done using PHP/MySQL. I don't know if I'm
really missing out on something by not using PEAR. How highly is it
recommended? On most job ads, i don't even see them mentioning PEAR.
They mostly just say PHP/MySQL.. Why is that? Don't people like PEAR


Re: is it really necessary? wrote:
Quoted text here. Click to load it

It's just a way to avoid coding something that already has been coded better
& more dynamic by others. It's not necessary to use it, but in big projects
it will save you a lot of time.

Rik Wasmus

Re: is it really necessary?

Quoted text here. Click to load it

I agree that sharing knowledge and ready-to-use class can be usefull. But it
is not necessary "coded better" nor more "dynamic" :). Moreover, the danger
is that in case of a bug, you have to learn how it works before you can do

So PEAR is to be used carefully in my opinion :)

Re: PEAR: is it really necessary?

If you're working in PHP 4.x PEAR is a separate piece of the puzzle,
and is basically just a bunch of code written in an Object Oriented
fashion. There's also PECL ("pickle") that re-creates much of the PEAR
objects in C, so they're compiled and run faster.

PEAR is built into PHP 5 from what I understand (just starting to work
in it now) so it's not "necessary" but it's available if you want to
use it for things like emailing, database connection (PDO), performance
monitoring, etc.

I didn't come from an OO background when I started with PHP, so I
didn't mess with PEAR or much of the OO model in 4. Since I've heard
good things about 5's implementation, I'm trying to wrap my brain
around it now.

D. wrote:
Quoted text here. Click to load it

Re: PEAR: is it really necessary?

DonO wrote:
Quoted text here. Click to load it

It should be noted almost none of PEAR is written in PHP5.  This means
that it doesn't take advantage of any of the really new and nifty
object constructs.  The advantage is it is backwards compatible with
almost any PHP version.

PEAR is not built into PHP.  I believe a few packages are included in
the default download, but most aren't.  The pear installer does come
with php, though, and you can use that to download andinstall any of
the pear packages.  If possible, I suggest using PECL, since the speed
and quality is generally much better (the downside is there aren't as
many packages that aren't beta or alpha).

BTW - please don't top post

Re: PEAR: is it really necessary?

*** Richard Levasseur escribió/wrote (28 Jul 2006 09:00:33 -0700):
Quoted text here. Click to load it

I've recently installed latest PHP 5 release under Windows and the bundled
PEAR script didn't even work correctly: I had to get a working one from
PEAR web site.

-+ - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
+- Mi web de humor con rayos UVA:

Site Timeline