What is exception in php?

Answers were Sorted based on User's Feedback



What is exception in php?..

Answer / 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

What is exception in php?..

Answer / 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

What is exception in php?..

Answer / guest

Wdsdggg

Is This Answer Correct ?    0 Yes 3 No

What is exception in php?..

Answer / lalu

eception is exception

Is This Answer Correct ?    2 Yes 8 No

Post New Answer

More PHP Interview Questions

Do you know what is the use of rand() in php?

1 Answers  


What does the scope of variables mean?

1 Answers  


Tell me what is needed to be able to use image function?

1 Answers  


Why is facebook still using php?

1 Answers  


Is empty array php?

1 Answers  


How to check your php installation?

1 Answers  


What does a delimiter do in mysql?

1 Answers  


What are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee(eno int(2),ename varchar(10)) ?

7 Answers   HCL,


How to remove duplicate values from php array?

1 Answers  


Which function would you use to replace a record in a database in php?

1 Answers  


Want to know the 10th max salary in salary table

3 Answers  


Write a PHP code to print following number pattern: 123 456 789

5 Answers  


Categories