note 32256 added to function.error-reporting

From: Date: Wed, 21 May 2003 17:33:39 +0000
Subject: note 32256 added to function.error-reporting
Groups: php.notes 
Request: Send a blank email to php-notes+get-48774@lists.php.net to get a copy of this message
Try to avoid the use of E_USER_* errors when you can, as the script can better handle bad input better with conditional branching: # e.g. user entered "foo" $bad_data = "foo"; if ($input = $bad_data) { myErrorHandler("Gave bad data $input"); } else { processData($input); } Also, as a programming practice try to use E_NOTICE whenever possible to catch undefined variables. ---- Manual Page -- http://www.php.net/manual/en/function.error-reporting.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32256 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32256&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32256&report=yes

« previous php.notes (#48774) next »