PHP MCQ Questions and Answers Quiz

11. PHP Scripts starts with _________________

  1. ?php ... ?php
  2. ...
  3. ...

12. The uses of strcmp( ) function in PHP?

  1. It compare strings excluding case
  2. It compare strings only Uppercase
  3. It compare strings including case
  4. It compare strings only lowercase

13. Variables are case-sensitive in PHP?

  1. False
  2. True

14. What does fopen() function do in PHP?

  1. It used to open Remote Server
  2. It used to open folders in PHP
  3. It used to open files in PHP
  4. It used to open Remote Computer

15. What does isset() function do in PHP?

  1. It checks whether variable is set or not
  2. It checks whether variable is free or not
  3. There is no such function in PHP
  4. It checks whether variable is string or integer

16. What does sprintf() function do in PHP?

  1. it prints the output of program
  2. it sends output to a variable converting into string
  3. it sends output to a variable
  4. it prints the output of program converting into string

17. What does the PHP Interpreter do?

  1. It creates connection between ISP & Server
  2. It processes the HTML and PHP files
  3. It translates User Language to System Language
  4. All of these

18. What is the use of strlen( ) function in PHP?

  1. It returns the value of a string
  2. It returns the length of a string
  3. It returns the type of a string
  4. It returns the subset value of a string

19. What is the use of strpos( ) function in PHP?

  1. Search for a Spaces within a string
  2. Search for a character/text within a string
  3. Search for a number within a string
  4. Search for a Capitalized string/text with in a string

20. What will be the result of combining a string with another data type in PHP?

  1. float
  2. string
  3. int
  4. double
Tags

MCQ Multiple Choice Questions and Answers on PHP

PHP Question and Answer