Php Interview Questions & Answers: part6



Php Interview QUESTIONS AND ANSWERS :: part6 : 11 to 15

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

11.In the PHP code given below, what is/are the properties?

echo “This is an example”;
public $name;
class Example
function sample()

12.Which one of the following is the right way to invoke a method?

$object->methodName();
object->methodName();
object::methodName();
$object::methodName();

13.Which of the following statements is/are true about Constructors in PHP? i) PHP 4 introduced class constructors. ii) Constructors can accept parameters. iii) Constructors can call class methods or other functions. iv) Class constructors can call on other constructors.

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

14.Which of the following method scopes is/are not supported by PHP? i) private ii) final iii) static iv) abstract

Only ii)
Only iv)
ii) and iv)
None of the mentioned

More Php Interview QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Identify your problems but give your power and energy to solutions- Tony Robbins