Web Application Development MCQs with Answers

Practice important Web Application Development MCQs with answers and explanations.

Chapter: 1
Q1:
What does PHP stand for?
A. Personal Home Page
B. PHP: Hypertext Preprocessor
C. Public Hypertext Processor
D. Professional Hypertext Processor
Correct Answer: B
Chapter: 1
Q2:
PHP is a _______ scripting language used for making dynamic and interactive web pages.
A. client-side
B. server-side
C. desktop
D. mobile
Correct Answer: B
Chapter: 1
Q3:
Which of the following is NOT a feature of PHP?
A. Generating dynamic page content
B. Creating, opening, reading files
C. Controlling user-access
D. Designing graphics
Correct Answer: D
Chapter: 1
Q4:
PHP can be used to output which of the following?
A. Only HTML
B. Only XML
C. HTML and images
D. Only PDFs
Correct Answer: C
Chapter: 1
Q5:
PHP can run on which of the following platforms?
A. Only Windows
B. Windows, Linux, Unix, Mac OS X
C. Only Linux
D. Windows and Mac OS X
Correct Answer: B
Chapter: 1
Q6:
Which of the following servers is compatible with PHP?
A. IIS only
B. Apache and IIS
C. IIS only
D. Apache only
Correct Answer: B
Chapter: 1
Q7:
PHP statements end with which symbol?
A. .
B. ;
C. :
D. ,
Correct Answer: B
Chapter: 1
Q8:
To install PHP on a Windows machine, which server software bundle can be used?
A. LAMP
B. WAMP
C. XAMPP
D. MAMP
Correct Answer: B
Chapter: 1
Q9:
In the PHP code <?php echo "Hello World!"; ?>, what does echo do?
A. It outputs a variable
B. It outputs text to the browser
C. It executes a function
D. It closes the PHP tag
Correct Answer: B
Chapter: 1
Q10:
The WAMP server is a combination of which components?
A. Windows, Apache, MySQL, PHP
B. Windows, Apache, MySQL, Perl
C. Windows, IIS, MySQL, PHP
D. Windows, Apache, MySQL, Python
Correct Answer: A
Chapter: 1
Q11:
The file extension for PHP pages is _______.
A. .html
B. .php
C. .phpx
D. .htm
Correct Answer: B
Chapter: 1
Q12:
PHP is not limited to outputting HTML; it can also output _______.
A. images and PDF files
B. text files only
C. videos only
D. text and graphics
Correct Answer: A
Chapter: 1
Q13:
Which tool in the WAMP package handles MySQL administration?
A. Apache
B. PHP
C. PhpMyAdmin
D. MySQL
Correct Answer: C
Chapter: 2
Q14:
What is the main difference between echo and print in PHP?
A. echo is faster than print
B. print can take multiple arguments
C. echo has a return value of 1
D. print is faster than echo
Correct Answer: A
Chapter: 2
Q15:
Which PHP statement is used to output text and can take multiple parameters?
A. print
B. echo
C. var_dump
D. include
Correct Answer: B
Chapter: 2
Q16:
In PHP, which of the following is case-insensitive?
A. Keywords, classes, and functions
B. Variable names
C. Function names
D. All of the above
Correct Answer: A
Chapter: 2
Q17:
What will the following code output? <?php $x = 5; $y = 10; echo $x + $y; ?>
A. 15
B. 510
C. 5+10
D. Error
Correct Answer: A
Chapter: 2
Q18:
Fill in the blank: Variables in PHP start with the _______ sign.
A. @
B. $
C. #
D. &
Correct Answer: B
Chapter: 2
Q19:
What will be the output of the following PHP code? <?php $txt = "Hello!"; echo $txt; ?>
A. Hello!
B. Hello World!
C. Error
D. Nothing
Correct Answer: A
Chapter: 2
Q20:
Which of the following is a valid PHP variable name?
A. $1variable
B. $_variable
C. $variable!
D. $Variable Name
Correct Answer: B

Test Your Knowledge

Take a timed quiz on Web Application Development

🚀 Start Quiz Now