News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Debuggable Blog:
Supressing Errors in PHP
January 30, 2009 @ 11:14:58

Felix Geisendorfer has posted two new items to the Debuggable blog looking at suppressing errors in your applications - and no, that doesn't mean using the @ operator either.

As of late I am getting sick of some best practices I have taught myself. Never using the @-error suppressing operator quickly moving to the top of the list. Before you start crying out loud (I know you will), let me say this: I do not mean to encourage anybody to use the @-operator. Applying the practice herein introduced may result in permanent damage to your coding habits and could serve as a gateway behavior to writing shitty code.

He gives an example in the first post of a place where he failed to properly check to ensure an element existed before checking a element of it. The second post provides an interesting solution to the same problem - using empty on the element/subelement to check its existence.

0 comments voice your opinion now!
suppress error empty isset check exist shutup operator symbol


blog comments powered by Disqus

Similar Posts

PHPMaster.com: Setting Custom Error Messages for Zend_Form_Element

Jeff Moore's Blog: Improved Error Messages in PHP

NETTUTS.com: 404/403 Website Error Pages With PHP Auto-Mailer

DevShed: Displaying Meaningful Error Messages when Auto Loading Classes in PHP 5

Paul Reinheimer's Blog: PHP BUG - err mm:core: failed to open semaphore file


Community Events

Don't see your event here?
Let us know!


laravel5 podcast opinion api laravel symfony voicesoftheelephpant unittest interview security version introduction extension framework community release threedevsandamaybe library series language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework