[ANN] PEAR Channel and Git Repository Mirror for PHP Markdown & Extra
Michel Fortin
michel.fortin at michelf.com
Sun Sep 2 16:52:13 EDT 2007
Le 2007-09-02 à 12:37, Milian Wolff a écrit :
> I once read that using "@" to suppress errors is quite slow. Why
> not use
> defined() ?
>
> if (!defined('...')) {
> define('...', '...');
> }
I know, I wrote about it a while ago: <http://michelf.com/weblog/2005/
bad-uses-of-the-at-operator/>.
The problem here is that the definitions at the start of PHP Markdown
are meant to be user-modifiable. I think adding this code to each
definition would make it more intimidating for users to change. It
would also makes the code a little less readable.
I know the error suppression operator is slow. I would never use @ in
a loop, but for something which happens only once (when the
markdown.php is included), I think that's fine.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list