Time remaining
:
:
Test Status
PHPTEST6
Ques 1 :
Whether One-line comment begin with pound sing(#) in php?
(A) True
(B) False
(C) None of above
Ques 2 :
In PHP, during error handling include() generates..................
(A) a fatal error, and the script will stop
(B) a warning, but the script will continue execution
(C) None of the above
Ques 3 :
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 4 :
What is the out put.
<?php
$x=array("aaa","","ccc","ddd","");
$y=array_unique($x);
echo count($x) . "," . count($y);
?>
(A) 3,1
(B) 3,3
(C) 5,4
(D) 5,5
Ques 5 :
PHP is a _____ . It means you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.
(A) client side language
(B) local language
(C) global language
(D) loosely typed language
Ques 6 :
Which of the following is not a valid variable name?
(A) $nic
(B) $number-in-class
(C) $NumberInClass
(D) $number_in_class
Ques 7 :
PHP is
(A) client side script language
(B) server side script language
(C) event-driven language
Ques 8 :
What is the out put
<?php
$father="mother";
$mother="son";
echo $$father;
?>
(A) son
(B) mother
(C) motherson
(D) error
Ques 9 :
What is the out put
<?php
$x=array(4,2,5,1,4,5,3,4);
$y=array_count_values($x);
echo count($y);
?>
(A) 8
(B) 7
(C) 5
(D) 28
Ques 10 :
The PHP syntax is most similar to
(A) PERL and C
(B) Java script
(C) VB Script
(D) Visual Basic
Ques 11 :
what will be the output of below code ?
$arr = array(5 => 1, 12 => 2);
$arr[] = 56;
$arr["x"] = 42;
echo var_dump($arr);
?>
a. array(4) { [5]=>int(1) [12]=> int(2) [13]=> int(56) ["x"]=> int(42) }
b. array(3) { [12]=> int(2) [13]=> int(56) ["x"]=> int(42) }
c. 1,2,56,42
d. 42
(A) a
(B) b
(C) c
(D) d
Ques 12 :
what will the ouptut of below date() function ?
<?php
$date="2009-5-19";
$time="14:31:38";
$datetime=$date.$time;
echo date("Y-m-d:H:i:s",strtotime($datetime));
?>
(A) 2009-5-19:14:31:38
(B) 19-5-2009:2:31:38
(C) 2009-5-19:2:31:38
(D) 19/5/2009:14:31:38
Ques 13 :
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 14 :
Trace the odd data type
(A) floats
(B) integer
(C) doubles
(D) Real number
Ques 15 :
In php string data are
(A) delimited by single quote
(B) delimited by double quote
(C) delimited by <<< identifier
(D) All of above
Ques 16 :
Which of the following delimiting method is known as string Interpolation
(A) delimited by single quote
(B) delimited by double quote
(C) delimited by <<< identifier
(D) All of above
Ques 17 :
Which datatypes are treaded as arrays
(A) Integer
(B) Float
(C) String
(D) Booleans
Ques 18 :
Which of following are compound data type?
(A) Array
(B) Objects
(C) Both
(D) None
Ques 19 :
Casting operator introduced in PHP 6 is?
(A) int64
(B) array
(C) object
(D) real or double or float
Ques 20 :
When defining identifier in PHP you should remember that
(A) Identifier are case sensitive. So $result is different than $ result
(B) Identifiers can be any length
(C) Both of above
(D) None of above
Submit Answer
Don't Refresh the Page !! ...