Php Interview Questions & Answers: part6



Php Interview QUESTIONS AND ANSWERS :: part6 : 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.Which of the following is/are the right way to declare a method? i) function functionName() { function body } ii) scope function functionName() { function body } iii) method methodName() { method body } iv) scope method methodName() { method body }

Only ii)
Only iv)
i) and ii)
iii) and iv)

2.Which version of PHP introduced the instanceof keyword?

PHP 4
PHP 5
PHP 5.3
PHP 6

3.PHP recognizes constructors by the name..

classname()
_construct()
function _construct()
function __construct()

4.Which keyword allows class members (methods and properties) to be used without needing to instantiate a new instance of the class?

protected
final
static
private

5.Which keyword is used to refer to properties or methods within the class itself?

private
public
protected
$this

More Php Interview QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
A real entrepreneur is somebody who has no safety net underneath them. Henry Kravis