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 is the difference between super () and this ()?

555


Why php language is used?

528


Is it possible to submit a form with a dedicated button?

504


What kind of variable is age?

607


What is difference between post and put in rest?

523






What is strcmp () in php?

534


Will react hooks replace redux?

513


Why json is used in php?

544


What is the difference between pop3 IMAP and MAPI?

643


Is php a middleware?

519


What is T_PAAMAYIM_NEKUDOTAYIM?

679


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

621


Why should I learn php?

515


Explain the difference between mysql_connect and mysql_pconnect?

482


What is the scope of a variable defined in a function?

558