PHP 14

COEP
Lets Crack Online Exam

IT Interview Exam Paper: PHP 14

Subject: PHP 14

Part 14: List for questions and answers of PHP

 

Q1. Which version of PHP introduced the static keyword?

a) PHP 4

b) PHP 5

c) PHP 5.2

d) PHP 5.3

 

Q2. Which keyword is used to access a static method or property from within the same class(rather than from child)?

a) static

b) strat

c) self

d) set

 

Q3. In which of the following circumstance should you use a static reference to a non static method?

a) Making a method call using parent

b) Making a method call using child

c) Making an object call using parent

d) Making an object call using child

 

Q4. Which one of the following variable cannot be used inside a static method?

a) $this

b) $get

c) $set

d) $date

 

Q5. What does PDO stand for?

a) PHP Data Orientation

b) PHP Database Object

c) PHP Database Orientation

d) PHP Data Object

 

Q6. Which version of PHP allows you to define constant properties within a class?

a) PHP 4

b) PHP 4.1

c) PHP 4.3

d) PHP 5 

 

Q7. Which keyword is used to declare a constant property?

a) const

b) con

c) constant

d) _constant

 

Q8. Which one of the following is a constant variable?

a) const $name

b) const $NAME

c) constant NAME

d) const NAME

 

Q9. What will happen if you try to set a value to a constant once it has been declared?

a) The value of the variable will change

b) The value of the variable will not change

c) Parse Error

d) Nothing

 

Q10. How many of the following can be contained in constants?

i)boolean

ii)integer

iii)float

iv)string

a) 1

b) 2

c) 3

d) 4

 

Q11. Which version of PHP introduced the static keyword?

a) PHP 4

b) PHP 5

c) PHP 5.2

d) PHP 5.3

 

Q12. Which keyword is used to access a static method or property from within the same class(rather than from child)?

a) static

b) strat

c) self

d) set 

 

Q13. In which of the following circumstance should you use a static reference to a non static method?

a) Making a method call using parent

b) Making a method call using child

c) Making an object call using parent

d) Making an object call using child

 

Q14. Which one of the following variable cannot be used inside a static method?

a) $this

b) $get

c) $set

d) $date

 

Q15. What does PDO stand for?

a) PHP Data Orientation

b) PHP Database Object

c) PHP Database Orientation

d) PHP Data Object

 

Q16. Which version of PHP allows you to define constant properties within a class?

a) PHP 4

b) PHP 4.1

c) PHP 4.3

d) PHP 5

 

Q17. Which keyword is used to declare a constant property?

a) const

b) con

c) constant

d) _constant

 

Q18. Which one of the following is a constant variable?

a) const $name

b) const $NAME

c) constant NAME

d) const NAME 

 

Q19. What will happen if you try to set a value to a constant once it has been declared?

a) The value of the variable will change

b) The value of the variable will not change

c) Parse Error

d) Nothing

 

Q20. How many of the following can be contained in constants?

i)boolean

ii)integer

iii)float

iv)string

a) 1

b) 2

c) 3

d) 4 

 

Part 14: List for questions and answers of PHP

 

Q1. Answer: b

 

Q2. Answer: c

 

Q3. Answer: a

 

Q4. Answer: a

 

Q5. Answer: d

 

Q6. Answer: d

 

Q7. Answer: a

 

Q8. Answer: d

 

Q9. Answer: c

 

Q10. Answer: d

 

Q11. Answer: b

 

Q12. Answer: c

 

Q13. Answer: a

 

Q14. Answer: a

 

Q15. Answer: d

 

Q16. Answer: d

 

Q17. Answer: a

 

Q18. Answer: d

 

Q19. Answer: c

 

Q20. Answer: d