Home
10th Grade
11th And 12th
11th Grade
12th Grade
3rd Grade
4th Grade
5th Grade
6th Grade
7th Grade
8th Grade
9th Grade
Advance Accountancy
Auditing
Computer Aptitude
Direct And Indirect Taxation
Exams
General Hindi
Indian Finance System
Information Technology And Application In Business
Macro Economics
Town Planning
Aerospace And Aeronautical
Analytical Instrumentation
Banking Awareness
Banking Exam
Biochemistry
Bioinformatics
Biology
Biotechnology
Business Statistics
C Program
C Programming
C++ Programming
Career Aptitude Test
Cell Biology
Central Superior Service (css)
Chemical Engineering
Chemistry
Civil Engineering
Commerce
Computer
Computer Fundamentals
Computer Science
Cost Accounting
Css
Database
Drug And Pharmaceutical Biotechnology
Ecat And Mcat Entry Test
Economics
Electrical Engineering
Electrical Engineering Questions
Electrical Measurement And Instrumentation
Engineering
English
English Literature
Environment Management
Environmental Biotechnology
Enzyme Technology
Financial Management And Financial Markets
Gate
General Knowledge
Graduate Assessment Test (gat)
Health And Physical
Heat Transfer
Html
Human Anatomy And Physiology
Human And Cultural Diversity
Human Resource Management
Ias
Indian Economy
Indian Economy
Indian General Awareness
Indian Geography
Indian Geography
Indian History
Indian History
Indian Polity
Instrumentation Transducers
International Relations
Java Program
Javascript
Judiciary And Law
Life Sciences
Management
Marketing And Marketing Management
Mass Transfer
Mechanical Engineering
Mechanics Of Materials
Medical Subjects
Microbiology
Networking
Php
Placement Tests
Professional Communication
Quantitative Aptitude
Reasoning Aptitude
Renewable Energy
Science
Sociology
Sql
Surveying
Total Quality Management
Uidai Aadhaar Supervisor Certification
Virology
Notificatin
Exam
Blog
Contact Us
Exceptions And Error Handling(Php ) Questions and Answers
Home
Topic
Php
Exceptions And Error Handling
Question 1.
Which version of PHP introduced E_STRICT Error level?
PHP 4
PHP 5
PHP 5.2
PHP 5.3
Explanation:-
Answer: Option B. ->
PHP 5
Description for E_STRICT is PHP version portability suggestions
Question 2.
How many error levels are available in PHP?
14
15
16
17
Explanation:-
Answer: Option C. ->
16
Question 3.
What is the description of Error level E_ERROR?
Fatal run-time error
Near-fatal error
Compile-time error
Fatal Compile-time error
Explanation:-
Answer: Option A. ->
Fatal run-time error
Question 4.
Which character do the error_reporting directive use to represent the logical operator NOT?
/
!
~
^
Explanation:-
Answer: Option C. ->
~
The twidle (~) character is used to represent the logical operator NOT.
Question 5.
Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?
error_reporting = E_ALL
error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR
error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR
error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR
Explanation:-
Answer: Option D. ->
error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR
Question 6.
Which version of PHP was added with Exception handling?
PHP 4
PHP 5
PHP 5.3
PHP 6
Explanation:-
Answer: Option B. ->
PHP 5
Exception handling was added to PHP with the version 5 release, and further enhanced with version 5.3.
Question 7.
Which of the following statements invoke the exception class?
throws new Exception();
throw new Exception();
new Exception();
new throws Exception();
Explanation:-
Answer: Option B. ->
throw new Exception();
Question 8.
How many methods are available for the exception class?
5
6
7
8
Explanation:-
Answer: Option C. ->
7
The seven methods are: getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString().
Question 9.
Which version added the method getPrevious()?
PHP 4
PHP 5
PHP 5.1
PHP 5.3
Explanation:-
Answer: Option D. ->
PHP 5.3
Question 10.
Which one of the following is the right description for the method getMessage() ?
Returns the message if it is passed to the constructor
Returns the message if it is passed to the class
Returns the message if it is passed to the file
Returns the message if it is passed to the object
Explanation:-
Answer: Option A. ->
Returns the message if it is passed to the constructor
1
2
Next →
One click Login
Login With Google
Old way of Login
Login With Email