What is exception in php?

Answer Posted / guest

Exception handling is used to change the normal flow of the
code execution if a specified error (exceptional) condition
occurs. This condition is called an exception.

This is what normally happens when an exception is
triggered:

•The current code state is saved
•The code execution will switch to a predefined (custom)
exception handler function
•Depending on the situation, the handler may then resume
the execution from the saved code state, terminate the
script execution or continue the script from a different
location in the code

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is __ invoke in php?

647


What is meant by PEAR in PHP?

736


How to get ip address of a server in php?

760


What are the 5 types of data?

737


What is http get and post?

721


What is php call function?

684


Is php used anymore?

711


How to create a session? How to set a value in session?

726


What is xss and csrf?

689


Write an example to remove html tags from a string in php?

691


What is the difference between md5(), crc32() and sha1() crypto on php?

831


What is the use of pear in php?

743


Explain how can we execute a php script using command line?

715


What are php magic methods?

723


What is cookies? How to create cookies in php?

689