Should I use PECL or PEAR?

This might sound like a stupid question,
but I’ve been wondering about this today
while working on a new project concerning
mp3 tag reading and writing.

I can include the PEAR classes for mp3 tag reading and writing and this works.

But IMO this is not the same as having the id3 tag extension included in the PHP installation (from PECL)

Which is best? Or are there no differences?


pecl extensions are php extensions, written in c. They have the ability to be faster/more efficient, and do things that you cannot do with php code alone. installation is required, by editing php.ini to load the extension, or compiling into php.

pear libraries are just php code, that you include at runtime into your scripts.

If it’s a server that you have enough control over to where you could properly install an extension, and you’re comfortable doing it, the extension would probably be much preferred.

thx for the reply.

In my case I have full control over server as it is my local home server.

It seems though that the PECL extension doesn’t have same functions as the PEAR extension class… (that is for the MP3 functionalities in my case)

Are you familiar with those differences? And do they follow up each other quickly? Or is PEAR more advanced, or vice versa?


pecl and pear aren’t intended to mimic each other. Different functionality is to be expected.

The PECL/PEAR extensions/libraries are usually projects people take up, so one person might decide to make MP3 class for PEAR, and another person might decide to make a PECL extension for working with MP3. Usually they work independently. Either way, there’s no body or person dictating what extended functionality PHP will have, so there’s no official standard or plan for, in this case, MP3, extensions.