PHP MCQ Questions with Answers | PHP Objective type questions and answers

PHP Multiple Choice Questions and Answers

1) Which of the following are not considered as Boolean false?
2) Consider the following class:
3) Variables/functions in PHP don't work directly with:
4) What is the output of the following code?
5) Which of the following multithreaded servers allow PHP as a plug-in?
6) Which of the following statements is incorrect with regard to interfaces?
7) Which of the following type cast is not correct?
8) What will be the output of the following code?
9) Which of the following are the valid PHP data types?
10) Which of the following characters are taken care of by htmlspecialchars?
11) What do you infer from the following code?
12) Which of the following is a correct declaration?
13) If visibility is not defined for a method/member then it is treated as public static
14) what is true regarding $a + $b where both of them are arrays?
15) Which of the following is Ternary Operator?
16) Which of the following vairables are supported by 'str_replace()' function?
17) Which of the following pair have non-associative equal precedence?
18) Which of the following attribute is needed for file upload via form?
19) Which of the following functions output text?
20) The inbuilt function to get the number of parameters passed is:
21) Consider the following two statements:
22) Multiple select/load is possible with:
23) Which of the following statement is not correct for PHP?
24) Which of the following printing construct/function accpets multiple parameters?
25) Does PHP provide the goto keyword in latest version?
26) We have two variable definitions:
27) Which of the following is not a predefined constant?
28) What will be the output of the following code?
29) You need to check the size of a file in PHP function.
$size = X(filename);
Which function will suitably replace 'X'?
30) Which of the following variables is not related to file uploads?
31) Which of the following variable names are invalid?
32) What will be the output of the following code?
33) What will be the output of following code?
34) What will be the output of the following code?
35) Which of the following variable declarations within a class is invalid in PHP5?
36) Which of the following is used to maintain the value of a variable over different pages?
37) How would you store order number (34) in an 'OrderCookie'?
38) The following php variables are declared:
39) Which of the following regular expressions can be used to check the validity of an e-mail addresses?
40) You wrote the following script to check of the right category:
41) You are using sessions and session_register() to register objects. These objects are serialized automatically at the end of each PHP page and are de-serialized automatically on each of the following pages. Is this true or false?
42) Which of the following is not supported in PHP5?
43) What will be the output of the following code?
echo 30*5 . 7;
44) In your PHP application you need to open a file. You want the application to issue a warning and continue execution, in case the file is not found. The ideal function to be used is:
46) You need to count the number of parameters given in the URL by a POST operation. The correct way is:
47) Which of the following is correct with regard to echo and print?
48) Which of the following functions output text?
49) How would you start a session?
50) What will be the output of following code?
51) Which of the following is not true regarding XForms?
52) You have defined three variables $to, $subject and $body to send an email. Which of the following methods would you use for sending an email?
53) Which of the following are useful for method overloading?
54) Which of the following is a PHP resource?
55) Does PHP 5 support exceptions?

5 comments:

Nikunj Gandhi said...

Hello

I found some good question that helps

PHP MCQs

Most Liked Stories said...

here is so much helpfull questions ans i like this....

Most Liked Stories said...

24) Which of the following printing construct/function accpets multiple parameters?
a. echo
b. print
c. printf
d. All of the above
Ans: a

is this right ans for this question?

Most Liked Stories said...

25) Does PHP provide the goto keyword in latest version?
a. Yes
b. No
Ans: b

this also

Unknown said...

Ans Of Queston 50 is b

Post a Comment

Blogger news