One error is some kind of mistake. One can say that an error is one condition of possessing incorrect or inaccurate knowledge. Or the error can be defined as an unexpected, or an invalid state of a program from which recovery is not possible.

syntax errors

These parse errors or syntax errors occur when there is some syntax mistake in coding the script, and the output comes to be Parse errors or syntax errors. Such types of errors stop the continuous execution of the required script. There can be several reasons behind the occurrence of such errors in the PHP language. Some common reasons are mentioned below.

The common reason for syntax errors:

  • Unclosed quotes
  • Unclosed braces
  • Missing or Extra parentheses
  • Missing semicolon

Fatal Errors

These are caused if PHP is able to comprehend what the user has written, but, what the user is asking PHP to do simply can not be done. These Fatal errors end the continuous execution for the script. When the user tries to access functions that are not defined, then what is received as output is the fatal error.

BY Best Interview Question ON 26 Jan 2020