InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Tell me some of the disadvantages of PHP |
|
Answer» The cons of PHP are:
|
|
| 2. |
What is the difference between “echo” and “print” in PHP? |
||||||||
|
Answer» The main difference between echo and print in PHP are given below:
|
|||||||||
| 3. |
What are the rules for naming a PHP variable? |
|
Answer» The following two rules are needed to be followed while naming a PHP variable:
|
|
| 4. |
What are the different types of variables present in PHP? |
|
Answer» Types of PHP Variables There are 8 primary DATA types in PHP which are used to construct the variables. They are:
|
|
| 5. |
Is PHP a case-sensitive language? |
|
Answer» PHP can be considered as a partial case-sensitive language. The variable names are completely case-sensitive but function names are not. ALSO, user-DEFINED functions are not case-sensitive but the rest of the language is case-sensitive. For example, user-defined functions in PHP can be defined in lowercase but LATER referred to in uppercase, and it WOULD STILL function normally. |
|
| 6. |
Explain the difference between $message and $$message. |
||||||||
|
Answer» The main difference between the $MESSAGE and $$message is given below:
|
|||||||||
| 7. |
What does PEAR stands for? |
|
Answer» PEAR stands for “PHP Extension and Application Repository”. PEAR is a FRAMEWORK and repository for all of the reusable PHP components. PEAR provides a higher level of programming for web developers. It contains all KINDS of PHP code snippets and libraries. It also provides you with a command-line interface to automatically INSTALL packages. |
|
| 8. |
Differentiate between variables and constants in PHP |
||||||||||
|
Answer» Few difference between variables and constants in PHP are given below:
|
|||||||||||