Sr. PHP Programmer Question:

Download Job Interview Questions and Answers PDF

What are the different errors in PHP?

Senior PHP Programmer Interview Question
Senior PHP Programmer Interview Question

Answer:

In PHP, there are three types of runtime errors, they are:

☛ Warnings:
These are important errors. Example: When we try to include () file which is not available. These errors are showed to the user by default but they will not result in ending the script.

☛ Notices:
These errors are non-critical and trivial errors that come across while executing the script in PHP. Example: trying to gain access the variable which is not defined. These errors are not showed to the users by default even if the default behavior is changed.

☛ Fatal errors:
These are critical errors. Example: instantiating an object of a class which does not exist or a non-existent function is called. These errors results in termination of the script immediately and default behavior of PHP is shown to them when they take place. Twelve different error types are used to represent these variations internally.

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
How will you retrieve the error message using Exception class in PHP when error occured?How preg_split() function works?