Time remaining
:
:
Test Status
PHPRANDOMTEST
Ques 1 :
What is the out put
<?php
$color=array("red","yellow","white");
$x=in_array("black",$color);
if($x==0)
echo "good bye";
if($x==1) echo "Hello";
?>
(A) Error
(B) Hello
(C) good bye
(D) None of the above
Ques 2 :
In PHP, which of the following function is used to insert content of one php file into another php file before server executes it .
(A) include[]
(B) #include()
(C) include()
(D) #include{}
Ques 3 :
Which of following commenting is supported by Php.
(A) Shell syntax - #
(B) Multiline Comment /* ------------- */
(C) Both of above
(D) None of above
Ques 4 :
Is php can support multiple inheritance?
(A) NO
(B) YES
Ques 5 :
Identify the invalid identifier ?
(A) my-function
(B) size
(C) -some word
(D) This&that
Ques 6 :
The PHP syntax is most similar to
(A) PERL and C
(B) Java script
(C) VB Script
(D) Visual Basic
Ques 7 :
Is it possible to submit a form with out a submit button?
(A) Yes
(B) No
Ques 8 :
What happens if you add a string to an integer using the + operator?
(A) The interpreter outputs a type mismatch error
(B) The string is converted to a number and added to the integer
(C) The string is discarded and the integer is preserved
(D) The integer and string are concatenated together in a new string
Ques 9 :
What is the out put.
<?php
$qpt = 'Eat to live, but not live to eat';
echo preg_match("/^to/", $qpt);
?>
(A) 0
(B) 1
(C) to
(D) Null
Ques 10 :
The left associative dot operator (.) is used in PHP for ?
(A) multiplication
(B) concatenation
(C) separate object and its member
(D) delimeter
Ques 11 :
Which of the following method sends input to a script via a URL?
(A) Get
(B) Post
(C) Both
(D) None
Ques 12 :
Which function includes the specified file even the statement evaluates to false in which block the function is placed?
(A) include ()
(B) require ()
(C) both of above
(D) None of above
Ques 13 :
Which datatypes are
treated
as arrays ?
(A) Integer
(B) Float
(C) String
(D) Booleans
Ques 14 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Ques 15 :
When you need to obtain the ASCII value of a character which of the following function you apply in PHP?
(A) asc( );
(B) ord( );
(C) chr( );
(D) val( );
Ques 16 :
Which of the following mode of fopen() function opens a file only for writing. If a file with that name does not exist, attempts to create anew file. If the file exist, place the file pointer at the end of the file after all other data.
(A) W
(B) W+
(C) A
(D) A+
Ques 17 :
Which of the following function is used to pick one or more random values from PHP Array?
(A) array_random()
(B) Rand_array()
(C) array_rand()
(D) Random_array()
Ques 18 :
Which of the following function returns the number of characters in a string variable?
(A) len($variable)
(B) count($variable)
(C) strcount($variable)
(D) strlen($variable)
Ques 19 :
Which of the following delimiter syntax is PHP's default delimiter syntax.
a. <% %>
b. <?php?>
c. <? ?>
d. <script language="php"> </script>
(A) a
(B) b
(C) c
(D) d
Ques 20 :
Which of the following is not a session function?
(A) session_destroy
(B) session_decode
(C) session_id
(D) session_pw
Submit Answer
Don't Refresh the Page !! ...