tags:

views:

66

answers:

2

When I use PEAR, it always generates
lots of errors.

How do you guys treating about them?

(1)use PEAR , and just ignore errors.
What is error thing? I can't see them.

(2)use PEAR, but tweak error level,
to they do not generate errors.

(3)Don't use PEAR thing. switch to cakephp.

+2  A: 

PEAR is very backwards compatible, so you will always get lot's of errors of newly deprecated functionality.

CakePHP also throws a lot of E_STRICT errors, so it's not uncommon.

Instead of just ignoring them, I would look at the error and try to assess for yourself whether or not it's an error worth ignoring.

I personally write for PHP 5.2 STRICT, so I don't use any PEAR libraries. I prefer to try to be future compatible, rather than backwards compatible and I assume there will be a recent enough version of PHP installed.

Evert
You mean you don't use PEAR, and you write same functions for yourself?
aaa
It really depends on what you're looking for and what you need. You don't truly NEED anything, and you CAN write everything yourself. But if you want to write code with no errors, you'll have to go with something like the Zend Framework.But before you make such a choice, do you actually know why you need any of them? Are you looking for some specific libraries or an MVC framework or otherwise?
Evert
A: 

For example when using ldap_connect I put a @ in front of the function. Was that what you meant? :)

Johan Soderberg
It's stop displaying errors. and I want to know that I should do that.
aaa
Depends on what function you're suppressing the error message for. If the connection to the ldap server fails I don't want the user to see the actual error, I will display a custom error message instead. In that case I think suppressing the error message is fine.
Johan Soderberg