PHP Online Quiz Following quiz provides Multiple Choice Questions (MCQs) related to PHP programming language. You will have to read all the given answers and click on view answer option.
These php online test quizzes on php web development, database have answers available with pdf, which in very useful in interview and also in php subject exam.
1. PHP Stands for…
A. Php Hypermarkup Preprocessor
B. Php Hypertext Processor
C. Php Hypermarkup Processor
D. Php Hypertext Preprocessor
2. PHP is which type scripting language?
3. Which of the following is used to add comments in PHP?
A. & … &
C. /* … */
D. Only B & C
4. PHP scripts are executed on?
A. Client Computer
B. It depends on PHP scripts
C. ISP Computer
D. Server Computer
5. Variables are case-sensitive in PHP?
6. PHP Scripts starts with?
A. <?php …. ?>
B. <php> … </php>
C. <p> … </p>
D. ?php … ?php
7. Which of the following statements prints in PHP?
8. In PHP Language variables name starts with?
A. * (Asterisk)
B. $ (Dollar)
C. ! (Exclamation)
D. & (Ampersand)
9. In PHP, each statement must be end with?
A. / (slash)
B. ; (semicolon)
C. . (dot)
D. : (colon)
10. In PHP Language variables are case sensitive?
A. Depends on website
D. Depends on server
11. Data for a cookie stored in _____ in PHP?
A. In ISP Computer
B. It depends on PHP Coding
C. In Server Computer
D. In User’s Computer
12. What does the PHP Interpreter do?
A. It creates connection between ISP & Server
B. It processes the HTML and PHP files
C. It translates User Language to System Language
D. All of these
13. In PHP a variable needs to be declaring before assign…
A. Depends on website
B. Depends on server
14. Which of the following is not the scope of Variable in PHP?
15. PHP is which typed language?
16. Which is the Concatenation Operator in PHP?
A. Dot (.)
B. Plus (+)
C. Ampersand (&)
D. Percentage (%)
17. Where session_start() function must appear in PHP?
A. With <html> tag
B. Before <html> tag
C. After <html>tag
18. How to define a variable in PHP?
A. $variable_name == value;
B. $variable_name = value
C. $variable_name as value;
D. $variable_name = value;
19. What does fopen() function do in PHP?
A. It used to open folders in PHP
B. It used to open files in PHP
C. It used to open Remote Computer
D. It used to open Remote Server
20. What does sprintf() function do in PHP?
A. it sends output to a variable converting into string
B. it prints the output of program
C. it prints the output of program converting into string
D. it sends output to a variable
21. What does isset() function do in PHP?
A. It checks whether variable is free or not
B. There is no such function in PHP
C. It checks whether variable is string or integer
D. It checks whether variable is set or not