What is exception in php?

Answer Posted / rishi (dipu lari)

PHP 5 has an exception model similar to that of other
programming languages. An exception can be thrown, and
caught ("catched") within PHP. Code may be surrounded in a
try block, to facilitate the catching of potential
exceptions. Each try must have at least one corresponding
catch block. Multiple catch blocks can be used to catch
different classes of exeptions. Normal execution (when no
exception is thrown within the try block, or when a catch
matching the thrown exception's class is not present) will
continue after that last catch block defined in sequence.
Exceptions can be thrown (or re-thrown) within a catch block.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When to use single quotes, double quotes, and backticks?

744


What is the purpose of using php?

775


What is full form of php? Who is the father or inventor of php?

757


Tell me is it possible to protect special characters in a query string?

689


How to get the number of characters in a string?

785


What is the meaning of symbol '$' in jquery?

757


How can php and javascript interact?

964


What is use of in_array() function in php?

762


How to receive a cookie from the browser?

760


How many types of array supported in php?

732


How to get ip address of a server in php?

774


How to redirect https to http url through .htaccess?

684


How to set a page as a home page in a php based site?

711


Do while loops php?

726


What is static method php?

739