• 1.
• 2.
• 3. <% %>
• 4.
2. You can define a constant by using the define() function. Once a constant is defined
• 1. It can never be changed or undefined
• 2. It can never be changed but can be undefined
• 3. It can be changed but can not be undefined.
• 4. It can be changed and can be undefined
3. The following piece of script will output:
$email=’ admin@psexam.com ’;
$new=strstr($email, ‘@’);
print $new;
?>
• 1. admin
• 2. admin@psexam
• 3. @psexam.com.
• 4. psexam.com
4. Which of the following function returns the number of characters in a string variable?
• 1. count($variable)
• 2. len($variable)
• 3. strcount($variable)
• 4. strlen($variable)
5. A variable $word is set to “HELLO WORLD”, which of the following script returns in title case?
• 1. echo ucwords($word)
• 2. echo ucwords(strtolower($word)
• 3. echo ucfirst($word)
• 4. echo ucfirst(strtolower($word)
6. Which of the following method is suitable when you need to send larger form submissions?
• 1. Get
• 2. Post
• 3. Both Get and Post
• 4. There is no direct way for larger form. You need to store them in a file and retrieve
7. The function setcookie( ) is used to
• 1. Enable or disable cookie support
• 2. Declare cookie variables
• 3. Store data in cookie variable
• 4. All of above
8. In mail($param2, $param2, $param3, $param4), the $param2 contains:
• 1. The message
• 2. The recipient
• 3. The header
• 4. The subject
9. Study following steps and determine the correct order
(1) Open a connection to MySql server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close Connection
• 1. 1, 4, 2, 3, 5
• 2. 4, 1, 2, 3, 5
• 3. 1, 5, 4, 2, 1
• 4. 4, 1, 3, 2, 5
10. Which of the following is not a session function?
• 1. session_decode
• 2. session_destroy.
• 3. session_id
• 4. session_pw
11. If a boolean variable $ alive= 5;
• 1. $ alive is false
• 2. $ alive is true
• 3. $ alive is overflow
• 4. the statement is not valid
12. To produce the output I love the summer time, Which of the ofllowing statement should be used?
• 1. I love the summer time");?>
• 2. I love the $ season"; ?>
• 3. I love the summer time ; echo $ message; ?>
• 4. All of above
13. Which of the following statement produce different output
• 1.
• 2.
• 3.
• 4.
14. Which of folowiing variable assignment is 'by value' assignment in PHP
• 1. $value1= $value?
• 3. $value1= & $value?
• 4. $value1= & $value?
• 5. None
15. Identify the variable scope that is not supported by PHP
• 1. Local variables.
• 2. Function parameters
• 3. Hidden variables
• 4. Global variables
16. The output of ofllowing script would be
function addit () {
GLOBAL $somerar;
$somerar++ ;
$somerar- - ;
$somerar++ ;
echo "somerar is $somerar";
}
addit ();
• 1. somerar is 15
• 2. somerar is 16.
• 3. somerar is 1
• 4. somerar is $ somerar.
17. The left association operator % is used in PHP for
• 1. percentage
• 2. bitwise or
• 3. division
• 4. modulus
18. Which of following are compound data type?
• 1. Array
• 2. Objects
• 3. Both
• 4. None
19. The left associative dot operator (.) is used in PHP for
• 1. multiplication
• 2. concatenation
• 3. separate object and its member
• 4. delimeter
20. Which of the following functions require the allow-url-fopen must be enabled?
• 1. include()
• 2. require()
• 3. both of above
• 4. None of above
21. Which of the folowing are valid float values?
• 1. 4.5678
• 2. 4.0
• 3. 7e4
• 4. All of above
22. Which of following function return 1 when output is successful?
• 1. echo ( )
• 2. print ( )
• 3. both
• 4. None
23. Which of the following variables is not a predefined variable?
• 1. $get
• 2. $ask
• 3. $request
• 4. $post
24. The difference between include() and require()
• 1. are different how they handle failure
• 2. both are same in every aspects
• 3. is include() produced a Fatal Error while require results in a Warning
• 4. none of above
25. The most portable version of PHP tag that is compatible to embed in XML or XHTML too is:
• 1.
• 2.
• 3. <% %>
• 4.
Answer:
Q Ans Q Ans
1 4 16 2
2 1 17 4
3 3 18 3
4 4 19 2
5 2 20 3
6 2 21 4
7 3 22 2
8 4 23 2
9 1 24 1
10 4 25 4
11 2
12 4
13 3
14 1
15 3
No comments:
Post a Comment