Time remaining
:
:
Test Status
PHPTEST4
Ques 1 :
What is the out put.
<?php
$x=array("aaa","ttt","www","ttt","yyy","tttt");
$y=array_count_values($x);
echo $y[ttt];
?>
(A) 2
(B) 3
(C) 1
(D) 4
Ques 2 :
How do you get information from a form that is submitted using the "get" method?
(A) $_GET[];
(B) Request.Form;
(C) Request.QueryString;
(D) $_POST[];
Ques 3 :
What's the best way to copy a file from within a piece of PHP?
(A) Print out a message asking your user to "telnet" in to the server and copy the file for you
(B) Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero
(C) Use the built in copy() function
(D) Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows)
Ques 4 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Ques 5 :
Is it possible to submit a form with out a submit button?
(A) Yes
(B) No
Ques 6 :
Full form of PHP.
(A) PreHypertextProcessor
(B) HypertextPreprocessor
(C) Hypertext Postprocessor
(D) PostHypertextProcessor
Ques 7 :
What is the expansion of LAMP?
(A) Linux And Mysql Php
(B) Linux Apache Mysql Php
Ques 8 :
In php Which method is used to getting browser properties?
(A) $_SERVER['PHP_SELF']
(B) $_SERVER['SERVER_NAME']
(C) $_SERVER['HTTP_USER_AGENT'];
(D) $_SERVER['HTTP_VARIENT']
Ques 9 :
Which of the following function is used to pick one or more random values from PHP Array?
(A) Random_array()
(B) array_random()
(C) Rand_array()
(D) array_rand()
Ques 10 :
What is the out put.
<?php
$x=array(1,3,2,3,7,8,9,7,3);
$y=array_count_values($x);
echo $y[8];
?>
(A) 43
(B) 8
(C) 1
(D) 6
Ques 11 :
Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function ?
(A) phptutor/index.php
(B) /phptutor/index.php
(C) c:/apache/htdocs/phptutor/index.php
(D) index.php
Ques 12 :
Which operator is used to concatenate two strings in php?
(A) dot operator (.)
(B) plus operator (+)
Ques 13 :
Are there regular expressions in PHP?
(A) Yes - regular expressions use Perl-like conventions
(B) Yes - PHP supports two different types of regular expressions: POSIX-extended and Perl-Compatible Regular Expressions (PCRE).
(C) Yes - regular expressions use the POSIX standard
(D) No - PHP uses "glob" style matching only
Ques 14 :
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 15 :
What will be the ouput of below code ? Assume that today is 2009-5-19:2:45:32 pm
<?php
$today = date("F j, Y, g:i a");
?>
(A) May 19, 2009, 2:45 pm
(B) may 19,09,2:45:32 PM
(C) May 19,2009,14:45:32 pm
(D) May 19,2009,14:45:32 PM
Ques 16 :
Which of the following function is used for terminate the script execution in PHP?
(A) quit()
(B) break()
(C) die()
Ques 17 :
What function used to print statement in PHP?
(A) echo();
(B) printf
(C) ""
Ques 18 :
what will be the ouput of below code ?
define("x","5");
$x=x+10;
echo x;
?>
(A) Error
(B) 5
(C) 10
(D) 15
Ques 19 :
what will be the output of below code ?
<?php
$arr = array(5 => 1, 12 => 2);
$arr[] = 56;
$arr["x"] = 42;
unset($arr);
echo var_dump($arr);
?>
(A) 42
(B) 56
(C) Null
(D) x=42
Ques 20 :
PHP variables are
(A) Single type variable
(B) Multitype variables
(C) Double type variables
(D) Trible type variables
Submit Answer
Don't Refresh the Page !! ...