Proposal: new extension disablesilenceoperator
| From: | Johannes Schlüter | Date: | Tue, 17 Feb 2009 20:36:55 +0000 |
| Subject: | Proposal: new extension disablesilenceoperator | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-6117@lists.php.net to get a copy of this message | ||
Hi,
I was working on some code with tons of @'s silencing errors making it
hard to debug, so I wrote a small extension simply overloading the
ZEND_BEGIN_SILENT and ZEND_END_SILENT opcodes so the behavior can be
controlled by setting an ini setting (INI_ALL) with the long name
disablesilenceoperator.disable_silence
Tarball with the sources (no package.xml, yet) can be found at
http://schlueters.de/~johannes/php/disablesilenceoperator.tar.gz
it
should work with PHP >= 5.1 but I tested 5.3 only, yet.
------
$ php -n -d error_reporting=E_ALL -d disablesilenceoperator.disable_silence=0 -r 'echo
@$i;'
$ php -n -d error_reporting=E_ALL -d disablesilenceoperator.disable_silence=1 -r 'echo
@$i;'
Notice: Undefined variable: i in Command line code on line 1
------
Any objections for adding it to pecl? (Except the stupid long name ...
ideas welcome there)
johannes