Once code is up and running, non-fatal runtime errors are the most common type of error in PHP. Runtime refers to errors that occur during execution of the code, which are not usually programming errors but caused factors outside PHP itself, such as disk or network operations or database calls.
PHP has an error-reporting mechanism that is used for all errors triggered inside PHP itself, either during compilation of the script or when executing a built-in function. You can use this error-reporting mechanism from a script as well, although there are more powerful ways of reporting errors (such as exceptions).
Even perfectly good code may produce runtime errors, so everyone has to deal with them in one way or another.
Examples of runtime errors occur when fopen() fails because a file is missing, when mysql_connect() fails because you specified the wrong username, if fsockopen() fails because your system runs out of file descriptors, or if you tried inserting a row into a table without providing a required not-null column.
- Kiran's blog
- 792 reads













Post new comment