The following quiz “PHP MCQ Questions And Answers” provide Multiple Choice Questions (MCQs) related to PHP. These PHP MCQs are also Interviews (campus interview, walk-in interview, company interview), Placement or recruitment, entrance examinations, and competitive examinations oriented. You can practice the below questions to improve your PHP skills. You can click on the View Answer button to check the answer. Let’s solve this PHP MCQ Questions And Answers Quiz. PHP is an open-source, interpreted, and object-oriented general-purpose scripting language, widely used as a server scripting language geared towards web development.
You can practice these PHP MCQs here and if you want a pdf of PHP MCQ Questions And Answers, we will provide a downloading link here soon so please keep visiting here for further modifications.
1. PHP stands for :
- Pretext Hypertext Preprocessor
- Hypertext Preprocessor
- Personal Home Processor
- None of the mentioned
Answer : B Explanation: PHP stands for Hypertext Preprocessor. PHP is an open-source, interpreted, and object-oriented scripting language that is widely used as a server scripting language geared towards web development.
2. PHP is a __________ language?
- Server-side scripting
- User-side scripting
- Client-side scripting
- Both A & C
Answer : A Explanation: PHP (Hypertext Preprocessor) is a server-side scripting language designed specifically for web development.
3. Who is known as the father of PHP?
- Willam Makepiece
- Drek Kolkevi
- Rasmus Lerdorf
- None of the above
Answer : C Explanation: PHP (Hypertext Preprocessor) was originally created by Rasmus Lerdorf in 1994 and that’s why he is known as the father of PHP.
4. What is PHP?
- PHP is used to develop dynamic and interactive websites
- PHP is an open-source programming language
- PHP is a server-side scripting language
- All of the above
Answer : D Explanation: Hypertext Preprocessor (PHP) is an open-source server-side scripting language that is used to build dynamic and interactive web pages or web applications and designed specifically for web development.
5. Which version of PHP introduced try/catch Exception?
- PHP 5.3
- PHP 5
- PHP 4
- PHP 6
Answer : B Explanation: PHP version 5 introduced support for exception handling.
6. Which of the following magic constant of PHP returns the full path and filename of the file?
Answer : D Explanation: _FILE_ returns the full path and filename of the file. If used inside an include, the name of the included file is returned. Since PHP (Hypertext Preprocessor) 4.0.2, “_FILE_” always contains an absolute path whereas in older versions of PHP, it contained relative path under some circumstances.
7. Which sign is used to access a variable of variable in PHP?
Answer : B Explanation: $$ sign is used to access variable of variable in PHP.
8. Which of the following is true about the php.ini file?
- The php.ini file is read each time PHP is initialized
- The PHP configuration file, php.ini, is the final and most immediate way to affect PHP’s functionality
- Both of the above
- None of the above
Answer : C Explanation: Both of the above option is correct.
Advance Java MCQ Questions And Answers
9. PHP files have a default file extension of ________
Answer : C Explanation: PHP files have a default file extension of .php. So, option C is correct.
10. Which of the following is used for concatenation in PHP?
Answer : D Explanation: In PHP, the . (dot) operator is used for concatenation. Suppose there are two variables $x and $y, so the statement $x.$y will concatenate both $x and $y.