Php Interview Questions & Answers: part7



Php Interview QUESTIONS AND ANSWERS :: part7 : 1 to 5

Following PHP Multiple choice objective type questions and answers will help you in many software compnaies written examinations and inteview 2015 :

1.What is the description of Error level E_ERROR?

Fatal run-time error
Near-fatal error
Compile-time error
Fatal Compile-time error

2.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

3.Which magic method is used to implement overloading in PHP?

__call
__invoke
__wakeup
__unset

4.If your object must inherit behavior from a number of sources you must use a/an

Interface
Object
abstract class
static class

5.Which of the following is/are true for an abstract class? i) A class is declared abstract by prefacing the definition with the word abstract. ii) A class is declare abstract by using the keyword implements. iii) It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class. iv) Attempting to instantiate an abstract class results in an error.

Only ii)
All of the mentioned
ii) and iv)
ii), iii) and iv)

More Php Interview QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Trust because you are willing to accept the risk, not because it’s safe or certain