Commerce

Basic Php MCQs

Practice Basic Php MCQs for competitive exams.

Basic Php MCQs

Practice questions from this topic.

Which of the following php statement/statements will store 111 in variable num? 1. int $num = 111; 2. int mum = 111; 3. $num = 111; 4. 111 = $num;

  1. A. Both 1 and 2
  2. B. All of the mentioned
  3. C. Only 3
  4. D. Only 1
Report Error

We can use _________ to comment a single line? 1. /? 2. // 3. # 4. /* */

  1. A. Only 2
  2. B. 1, 3 and 4
  3. C. 2, 3 and 4
  4. D. Both 2 and 4
Report Error

Which version of PHP introduced Try/catch Exception?

  1. A. PHP 4
  2. B. PHP 5
  3. C. PHP 5.3
  4. D. PHP 6
Report Error

Which of the following must be installed on your computer so as to run PHP script? 1. Adobe Dreamweaver 2. PHP 3. Apache 4. IIS

  1. A. All of the mentioned.
  2. B. Only 2
  3. C. 2 and 3
  4. D. 2, 3 and 4
Report Error

Which of the following is/are a PHP code editor? 1. Notepad 2. Notepad++ 3. Adobe Dreamweaver 4. PDT

  1. A. Only 4
  2. B. All of the mentioned
  3. C. 1, 2 and 3
  4. D. Only 3
Report Error

PHP files have a default file extension of_______.

  1. A. .html
  2. B. .xml
  3. C. .php
  4. D. .ph
Report Error

What does PHP stand for? 1. Personal Home Page 2. Hypertext Preprocessor 3. Pretext Hypertext Processor 4. Preprocessor Home Page

  1. A. Both 1 and 3
  2. B. Both 2 and 4
  3. C. Only 2
  4. D. Both 1 and 2
Report Error