More MCQs
401.

What function computes the difference of arrays?

A. array_diff
B. diff_array
C. arrays_diff
D. diff_arrays
Answer» A. array_diff
402.

What functions count elements in an array?

A. Count
B. Size
C. Array_Count
D. Count_array
Answer» A. Count
403.

There are three different kind of arrays:

A. Numeric array, String array, Multidimensional array
B. Numeric array, Associative array, Dimensional array
C. Numeric array, Associative array, Multidimensional array
D. Const array, Associative array, Multidimensional array
Answer» C. Numeric array, Associative array, Multidimensional array
404.

Which array function checks if the specified key exists in the array

A. array_key_exist()
B. array_key_exists()
C. array_keys_exists()
D. arrays_key_exists()
Answer» B. array_key_exists()
405.

Which of the following DBMSs do not have a native PHP extension?

A. MySQL
B. IBM DB/2
C. Microsoft SQL Server
D. None of the above
Answer» D. None of the above
406.

In PHP in order to access MySQL database you will use:

A. mysqlconnect() function
B. mysql-connect() function
C. mysql_connect() function
D. sql_connect() function
Answer» C. mysql_connect() function
407.

PHP files have a default file extension of..

A. .html
B. .xml
C. .php
D. .ph
Answer» C. .php
408.

Which of the following is/are a PHP code editor? i) Notepad ii) Notepad++ iii) Adobe Dreamweaver iv) PDT

A. Only iv)
B. Only iii)
C. i), ii) and iii)
D. All of the above
Answer» B. Only iii)
409.

Which version of PHP introduced Try/catch Exception?

A. PHP 4
B. PHP 5
C. PHP 5.3
D. PHP 6
Answer» B. PHP 5
410.

We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */

A. Only ii)
B. i), iii) and iv)
C. ii), iii) and iv)
D. Both ii) and iv)
Answer» C. ii), iii) and iv)
411.

Which of the below statements is equivalent to $add += $add ?

A. $add = $add
B. $add = $add +$add
C. $add = $add + 1
D. $add = $add + $add + 1
Answer» B. $add = $add +$add
412.

Which of the below symbols is a newline character?

A. \r
B. \n
C. /n
D. /r
Answer» B. \n
413.

Which of the conditional statements is/are supported by PHP?
i) if statements
ii) if-else statements
iii) if-elseif statements
iv) switch statements

A. Only i)
B. i), ii) and iv)
C. ii), iii) and iv)
D. All of the above
Answer» D. All of the above
414.

Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop

A. i) and ii)
B. i), ii) and iii)
C. All of the above
D. None of the above
Answer» C. All of the above
415.

If $a = 12 what will be returned when ($a == 12)? 5: 1 is executed?

A. 12
B. 1
C. Error
D. 5
Answer» D. 5
416.

Who is the father of PHP?

A. Rasmus Lerdorf
B. Willam Makepiece
C. Drek Kolkevi
D. List Barely
Answer» A. Rasmus Lerdorf
417.

What will be the output of the following php code? <?php $num = "1"; $num1 = "2"; print $num+$num1; ?>

A. 3
B. 1+2
C. Error
D. 12
Answer» A. 3
418.

Which of following variables can be assigned a value to it? i) $3hello ii) $_hello iii) $this iv) $This

A. All of the above
B. Only ii)
C. ii), iii) and iv)
D. ii) and iv)
Answer» D. ii) and iv)
419.

What will be the output of the following PHP code? <?php $a = "clue"; $a .= "get"; echo "$a"; ?>

A. get
B. true
C. false
D. clueget
Answer» D. clueget
Tags
  • Question and answers in Web Technology,
  • Web Technology multiple choice questions and answers,
  • Web Technology Important MCQs,
  • Solved MCQs for Web Technology,
  • Web Technology MCQs with answers PDF download