Re: Silencing @
| From: | Helgi Þormar | Date: | Mon, 31 Oct 2005 13:24:29 +0000 |
| Subject: | Re: Silencing @ | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-3202@lists.php.net to get a copy of this message | ||
On Mon, 31 Oct 2005 13:53:52 +0100, bertrand Gugger wrote:
> Bonjour,
> This thema started wirh an IRC discussion about the use of error
> silencing @.
>
> The case was an optional include in some package
> ("some" = I don't remember which one but a few do/need that)
> It has an optional feature, just conditioned by the existence of a
> potential include 'there/option.php'.
> Naturally, the package will use include or include_once as it's not
> fatal that 'there/option.php' does not exist:
>
> require_once 'there/option.php';
> if (class_exist('option') { ... // skipped the '_' <==> '/'
> translation
> to be short
Maybe I have to introduce people to file_exists ?
People should always use file_exists when they are doing some kind of a
driver approach and the driver might not be there (MDB2 and its drivers is
one good example, it handles that nicely)
Think we should rather focus on that kind of way rather than having some
obscure error reporting magic :)
- Helgi