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

What are the benefits of using php?

741


What is meant by session in php?

721


What is static in php?

752


What is php good for?

712


How you can update memcached when you make changes to php?

864


What is the use of mysql_real_escape_string() function?

726


What is Mcrypt used for?

786


How long does a session last in php?

721


Which is better php praogramming or cad/cam scope wise and also salaray wise?

1790


What is php compared to html?

747


How to generate a form?

843


What is alias in php?

820


What is an anti csrf token?

712


What is meant by variable variables in php?

734


Does php have future?

770