How many types of errors in PHP?
Primarily PHP supports four types of errors, listed below:-
- Syntax Error
- Fatal Error
- Warning Error
- Notice Error
1. Syntax Error: It will occur if there is a syntax mistake in the script
2. Fatal Error: It will happen if PHP does not understand what you have written. For example, you are calling a function, but that function does not exist. Fatal errors stop the execution of the script.
3. Warning Error: It will occur in following cases to include a missing file or using the incorrect number of parameters in a function.
4. Notice Error: It will happen when we try to access the undefined variable.
Note: The page you are accessing has some of the most basic and complex PHP Interview Questions and Answers. You can download it as a PDF to read it later offline.
BY Best Interview Question ON 06 Jul 2020