Sail E0 Webinar

MCQs

Total Questions : 54 | Page 4 of 6 pages
Question 31. Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
  1.    When the function contains only one parameter
  2.    When the function is being declared as a member of a class
  3.    When the parameter is being declared as passed by reference
  4.    Never
  5.    When the parameter is Boolean
 Discuss Question
Answer: Option C. -> When the parameter is being declared as passed by reference
Question 32. Variables always start with a ........ in PHP
  1.    Dollar-sign
  2.    Yen-sign
  3.    Pond-sign
  4.    Euro-sign
 Discuss Question
Answer: Option A. -> Dollar-sign
Question 33. PHP is an open source software.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
Question 34. PHP runs on different platforms (Windows, Linux, Unix, etc.)
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
Question 35. Which of the following is not valid PHP code?
  1.    $aVaR
  2.    &$something
  3.    ${“MyVar”}
  4.    $_10
  5.    $10_somethings
 Discuss Question
Answer: Option E. -> $10_somethings
Question 36. If you echo a Boolean variable, the value FALSE displays as a .... and the value TRUE echoes as a .....
  1.    0, 1
  2.    blank string, 2
  3.    empty variable, 1
  4.    blank string, 1
 Discuss Question
Answer: Option D. -> blank string, 1
Question 37. You can test the type of any variable with the ..... function.
  1.    showtype()
  2.    settype()
  3.    whattype()
  4.    gettype()
 Discuss Question
Answer: Option D. -> gettype()
Question 38. Assigning the empty string (like ' ') to a variable automatically renders it empty.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
Question 39. String values must be enclosed in ......
  1.    none of above
  2.    single quotes
  3.    both A and B
  4.    double quotes
 Discuss Question
Answer: Option C. -> both A and B
Question 40. When a simple data type is casted to an array, an array is created with the original value in the first element.
  1.    False
  2.    True
 Discuss Question
Answer: Option B. -> True

Latest Videos

Latest Test Papers