mcqs bucket

  • PHP Mcqs Questions | MCQs Bucket Largest Mcqs Website

    mcqsbucket

      Best guide for exams of all nature, Competitive exams and Interviews
Here is the MCQs guide for the topic of PHP. you will find various types of questions along with there answers in this
Q. Which operator is used to check if two values are equal and of same data type?
A.
===
B.
!=
C.
==
D.
=


Show Answer
Q. The if statement is used to execute some code only if a specified condition is true
A.
True
B.
False


Show Answer
Q. What is the default number of seconds that cached session pages are made available before the new pages are created?
A.
360
B.
180
C.
1800
D.
3600


Show Answer
Q. If the directive session.cookie_lifetime is set to 3600, the cookie will live until
A.
3600 sec
B.
3600 min
C.
3600 hrs


Show Answer
Q. If session.use_cookie is set to 0, this results in use of
A.
Session
B.
Cookie
C.
URL rewriting
D.
Nothing happens


Show Answer
Q. Which one of the following is the default PHP session name?
A.
PHPSESSID
B.
PHPSESID
C.
PHPSESSIONID
D.
PHPIDSESS


Show Answer
Q. How many ways can a session data be stored in PHP?
A.
3
B.
4
C.
5
D.
6


Show Answer
Q. Which one of the following is the very first task executed by a session enabled page in PHP?
A.
Delete the previous session
B.
Start a new session
C.
Check whether a valid session exists
D.
Handle the session


Show Answer
Q. 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


Show Answer
Q. What will be the output of the following php code?
$num = 1;
$num1 = 2;
print $num . "+". $num1;

A.
3
B.
4
C.
1+2
D.
$num . "+". $num1;


Show Answer