PHP MCQ Quiz Question with Answer

Categories: PHP Interview questions and answers Experienced Freshers MCQ

PHP MCQ Quiz Question with Answer

 

1) PHP stands for -

  1. Hypertext Preprocessor
  2. Pretext Hypertext Preprocessor
  3. Personal Home Processor
  4. None of the above

Answer: (a)

 

2) Who is known as the father of PHP?

  1. Drek Kolkevi
  2. List Barely
  3. Rasmus Lerdrof
  4. None of the above

Answer: (c)

 

3) Variable name in PHP starts with -

  1. ! (Exclamation)
  2. $ (Dollar)
  3. & (Ampersand)
  4. # (Hash)

Answer: (b)

 

4) Which of the following is the default file extension of PHP?

  1. .php
  2. .hphp
  3. .xml
  4. .html

Answer: (a) 

 

5) Which of the following is not a variable scope in PHP?

  1. Extern
  2. Local
  3. Static
  4. Global

Answer: (a) 

 

6) Which of the following is correct to add a comment in php?

  1. & …… &
  2. // ……
  3. /* …… */
  4. Both (b) and (c)

Answer: (d) Both (b) and (c)

 

7) Which of the following is used to display the output in PHP?

  1. echo
  2. write
  3. print
  4. Both (a) and (c)

Answer: (d) Both (a) and (c)

 

8) Which of the following is the use of strlen() function in PHP?

  1. The strlen() function returns the type of string
  2. The strlen() function returns the length of string
  3. The strlen() function returns the value of string
  4. The strlen() function returns both value and type of string

Answer: (b) 

 

9) Which of the following is used for concatenation in PHP?

  1. + (plus)
  2. (Asterisk)
  3. . (dot)
  4. append ()

Answer: (c)

 

10) Which of the following starts with __ (double underscore) in PHP?

  1. Inbuilt constants
  2. User-defined constants
  3. Magic constants
  4. Default constants

Answer: (c) Magic constants

Top articles
How to check version of php Published at:- Definition and Type of Python Comment Published at:- Pass by reference vs value Published at:- Python - Network Programming Published at:- PHP Installation on Mac OS X with Apache Published at:- PHP Installation on Windows XP 2000 and XP with IIS Published at:- PHP Installation on Windows XP 2000 & XP with Apache Published at:- PHP MCQ Quiz Question with Answer Published at:- PHP MCQ Quiz Question with Answer (set 2) Published at:- 5 Laravel Development Tools Developers Must Use Published at:- PHP and its use Published at:-
R4Rin Team
The content on R4Rin.com website is created by expert teams.