note 90987 added to language.operators.errorcontrol

From: Date: Tue, 19 May 2009 20:46:14 +0000
Subject: note 90987 added to language.operators.errorcontrol
Groups: php.notes 
Request: Send a blank email to php-notes+get-155759@lists.php.net to get a copy of this message
Error suppression should be avoided if possible as it doesn't just suppress the error that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. This will make debugging a nightmare. It is far better to test for the condition that you know will cause an error before preceding to run the code. This way only the error that you know about will be suppressed and not all future errors associated with that piece of code. There may be a good reason for using outright error suppression in favor of the method I have suggested, however in the many years I've spent programming web apps I've yet to come across a situation where it was a good solution. The examples given on this manual page are certainly not situations where the error control operator should be used. ---- Server IP: 69.147.83.197 Probable Submitter: 58.7.65.7 ---- Manual Page -- http://www.php.net/manual/en/language.operators.errorcontrol.php Edit -- https://master.php.net/note/edit/90987 Del: integrated -- https://master.php.net/note/delete/90987/integrated Del: useless -- https://master.php.net/note/delete/90987/useless Del: bad code -- https://master.php.net/note/delete/90987/bad+code Del: spam -- https://master.php.net/note/delete/90987/spam Del: non-english -- https://master.php.net/note/delete/90987/non-english Del: in docs -- https://master.php.net/note/delete/90987/in+docs Del: other reasons-- https://master.php.net/note/delete/90987 Reject -- https://master.php.net/note/reject/90987 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#155759) next »