Jump to content

Error reporting and coding standards?


Dilated

Recommended Posts

I've recently switched error reporting to E_ALL|E_STRICT on my website. I've been going through all my code line by line, fixing every notice/warning/error/etc.Is this the standard by which php should be coded? Or is it acceptable to turn notices off and not bother checking to see if a variable is undefined with isset? Checking every $_POST value with isset, especially in certain situations, seems like it can be ridiculously impractical. What do you guys think?

Link to comment
Share on other sites

I personally think it would be a foolish idea to go live with code full of errors, but that's just me. Being able to handle errors is just as important as trying to avoid them, and practical programmers opt to handle for all cases. Cause you never know.

Link to comment
Share on other sites

Error reporting at this level is designed for the development stage, ie while you're programming. When the page is ready for users, most errors should not exist. For those that cannot be controlled, like runtime file-system errors, etc., you should have mechanisms that test for those errors and handle them gracefully.So the answer is, whatever works best for you.Real users do not want to see PHP's error reporting.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...