Sail E0 Webinar

MCQs

Total Questions : 77 | Page 1 of 8 pages
Question 1. Which one of the following is the right way of defining a function in PHP?
  1.    function { function body }
  2.    data type functionName(parameters) { function body }
  3.    functionName(parameters) { function body }
  4.    function fumctionName(parameters) { function body }
 Discuss Question
Answer: Option D. -> function fumctionName(parameters) { function body }
Question 2. Type Hinting was introduced in which version of PHP?
  1.    PHP 4
  2.    PHP 5
  3.    PHP 5.3
  4.    PHP 6
 Discuss Question
Answer: Option B. -> PHP 5
Question 3. What will happen in this function call?
  1.    Call By Value
  2.    Call By Reference
  3.    Default Argument Value
  4.    Type Hinting
 Discuss Question
Answer: Option A. -> Call By Value
Question 4. What will be the output of the following PHP code?
  1.    Error
  2.    0
  3.    42
  4.    84
 Discuss Question
Answer: Option C. -> 42
Question 5. Which of the following are valid function names?
1. function()
2. €()
3. .function()
4. $function()
  1.    Only 2
  2.    None of the mentioned
  3.    All of the mentioned
  4.    3 and 4
 Discuss Question
Answer: Option A. -> Only 2
Question 6. What will be the output of the following PHP code?
  1.    helloblabla
  2.    Error
  3.    hello
  4.    helloblablablabla
 Discuss Question
Answer: Option C. -> hello
Question 7. What will be the output of the following PHP code?
  1.    Error
  2.    $msg
  3.    0
  4.    Will this work
 Discuss Question
Answer: Option D. -> Will this work
Question 8. A function in PHP which starts with ______ (double underscore) is know as.
  1.    Magic Function
  2.    Inbuilt Function
  3.    Default Function
  4.    User Defined Function
 Discuss Question
Answer: Option A. -> Magic Function
Question 9. Which one of the following PHP functions can be used to build a function that accepts any number of arguments?
  1.    func_get_argv()
  2.    func_get_argc()
  3.    get_argv()
  4.    get_argc()
 Discuss Question
Answer: Option B. -> func_get_argc()
Question 10. Which one of the following PHP functions can be used to find files?
  1.    glob()
  2.    file()
  3.    fold()
  4.    get_file()
 Discuss Question
Answer: Option A. -> glob()

Latest Videos

Latest Test Papers