

MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
1. |
How many of the following can be contained in constants? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4View Answer |
Answer» E. | |
2. |
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 |
Answer» D. Nothing | |
3. |
Which one of the following is a constant variable? |
A. | const $name |
B. | const $NAME |
C. | constant NAME |
D. | const NAME |
Answer» E. | |
4. |
Which keyword is used to declare a constant property? |
A. | const |
B. | con |
C. | constant |
D. | _constant |
Answer» B. con | |
5. |
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 |
Answer» E. | |
6. |
What does PDO stand for? |
A. | PHP Data Orientation |
B. | PHP Database Object |
C. | PHP Database Orientation |
D. | PHP Data Object |
Answer» E. | |
7. |
Which one of the following variable cannot be used inside a static method? |
A. | $this |
B. | $get |
C. | $set |
D. | $date |
Answer» B. $get | |
8. |
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 |
Answer» B. Making a method call using child | |
9. |
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. | ?a) staticb) stratc) selfd) set |
Answer» D. ?a) staticb) stratc) selfd) set | |
10. |
Which version of PHP introduced the static keyword? |
A. | PHP 4 |
B. | PHP 5 |
C. | PHP 5.2 |
D. | PHP 5.3 |
Answer» C. PHP 5.2 | |