PHP Errors
Errors may be encountered due to incorrect use of PHP build-in features, errors in our code, and even from errors triggered in other people's code. Whatever the cause, it is probably explained in one of out articles.
- How to create a custom error handler for PHP that handles non-fetal errors.
- The fread function can be dangerous when used inside a loop in PHP, find out how to secure it in this article.
- How to show or hide error messages in PHP. There are several ways to do this; from within the PHP scripts themselves, from php.ini, or from changing Apache configuration files.
- E_STRICT will only show you warnings about deprecated PHP features and things that might not be future-proof, it will not show you notices or warnings; E_ALL includes everything, and that includes E_STRICT messages.
- Developers can trigger custom PHP error messages using the trigger_error function; but throwing an exception is often better.