PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Sameer Borate's Blog: Disabling the silence @-operator in PHP

Note: This article was originally published at PHPDeveloper on 6 July 2010.
PHPDeveloper

As Sameer Borate points out in his latest post to his blog, there's a way to disable that pesky suppression operator (@) in your PHP installation thanks to the scream extension.

PHP supports one error control operator: the at sign (@). When prepended to an expression any error generated by that expression will be ignored. It can also be useful for hiding errors generated by various functions. [...] Although quite useful at some times, using the @-operator can have some annoying side effects.

He shows you how to install the extension on a stock Ubuntu platform (including the PHP packages) and how use the feature in your application by means of a call to ini_set (or, of course, setting it in your php.ini file).