Sail E0 Webinar

MCQs

Total Questions : 75 | Page 7 of 8 pages
Question 61. What will be the output of the following PHP code ?function email(){$email = ’contact@examians.com’;$new = strstr($email, ‘@');echo $new;}email();
  1.    examians.com
  2.    contact
  3.    @examians.com
  4.    contact@examians.com
 Discuss Question
Answer: Option C. -> @examians.com
Question 62. What will be the output of the following PHP code ?function constant(){define("GREETING", "Welcome to Narnia",true);echo greeting;}
  1.    greeting
  2.    ERROR
  3.    Welcome to Narnia
  4.    GREETING
 Discuss Question
Answer: Option C. -> Welcome to Narnia
Question 63. What will be the output of the following PHP code ?function start($string){if ($string < 45)return 20;elsereturn 40;}$t = start(90);if ($t < 20){echo "Have a good day!";}else{echo "Have a good night!";}
  1.    Have a good night!
  2.    ERROR
  3.    Have a good day!
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Have a good night!
Question 64. What will be the output of the following PHP code ?function string(){echo strstr("Hello world!", 111);}string();
  1.    111
  2.    o world!
  3.    No Output
  4.    Hello world!
 Discuss Question
Answer: Option B. -> o world!
Question 65. What will be the output of the following PHP code ?function constant(){define("GREETING", "Welcome to Narnia");echo greeting;}
  1.    Welcome to Narnia
  2.    ERROR
  3.    greeting
  4.    GREETING
 Discuss Question
Answer: Option B. -> ERROR
Question 66. Phpinfo() will display about?1. OS version information2. PHP installation3. Variables4. HTTP headers
  1.    Option 2
  2.    Option 1
  3.    Option 4
  4.    All listed here
 Discuss Question
Answer: Option D. -> All listed here
Question 67. . . . . returns a new DateTime object.
  1.    date()
  2.    getdate()
  3.    date_sunrise()
  4.    date_create()
 Discuss Question
Answer: Option D. -> date_create()
Question 68. . . . . . converts the keys of an array into values and the values into keys.
  1.    array_flip()
  2.    array_trans()
  3.    array_transpose()
  4.    array_flips()
 Discuss Question
Answer: Option A. -> array_flip()
Question 69. Above usleep() function pauses PHP for .usleep(1000000);
  1.    100 microseconds
  2.    1 second
  3.    10 seconds
  4.    1 microseconds
 Discuss Question
Answer: Option B. -> 1 second
Question 70. Output will be:$array = array(0, 1, 2);$array = array_pad($array, -6, ‘NEW’);
  1.    Array ( [0] => NEW [-1] => NEW [-2] => NEW [-3] => 0 [-4] => 1 [-5] => 2 )
  2.    Array ( [1] => NEW [2] => NEW [3] => NEW [4] => 0 [5] => 1 [6] => 2 )
  3.    Array ( [0] => NEW [1] => NEW [2] => NEW [3] => 0 [4] => 1 [5] => 2 )
  4.    Array ( [-1] => NEW [-2] => NEW [-3] => NEW [-4] => 0 [-5] => 1 [-6] => 2 )
 Discuss Question
Answer: Option C. -> Array ( [0] => NEW [1] => NEW [2] => NEW [3] => 0 [4] => 1 [5] => 2 )

Latest Videos

Latest Test Papers