Time remaining
:
:
Test Status
PHPTEST5
Ques 1 :
Which of these statements is true?
(A) PHP interfaces to the MySQL database,and you should transfer any data in Oracle or Sybase to MySQL if you want to use PHP on the data.
(B) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase but the interface differs in each case.
(C) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase. A wrapper layer is provided so that code written for one database can easily be transferred to another if you later switch your database engine.
(D) There's little code in PHP to help you interface to databases, but there's no reason why you can't write such code if you want to.
Ques 2 :
Is php can support multiple inheritance?
(A) NO
(B) YES
Ques 3 :
How would you add 1 to the variable $count?
(A) incr count;
(B) $count =+1
(C) $count++;
(D) incr $count;
Ques 4 :
Which of the following is used to check if a function has already been defined?
(A) bool func_exist(functioname)
(B) bool function_exists(functionname)
(C) bool f_exists(functionname)
Ques 5 :
what is the return value of this substr function?
<?php
$rest = substr("abcdef", -1);
$rest = substr("abcdef", 0, -1);
?>
(A) f,abcde
(B) b,abcdef
(C) a,fedcb
(D) a,abcde
Ques 6 :
Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used basename($_SERVER['PHP_SELF']) function in your page, then what is the return value of this function ?
(A) phptutor
(B) phptutor/index.php
(C) index.php
(D) /index.php
Ques 7 :
program will call the function display_result()
<? php
$x="display";
${$x.'_result'} ();
?>
(A) False
(B) True
(C) Parser Error
(D) None of the above
Ques 8 :
All variables in PHP start with which symbol?
(A) !
(B) &
(C) $
(D) %
Ques 9 :
Father of PHP?
(A) Larry Wall
(B) Guido Van Rossum
(C) Rasmus Lerdorf
(D) James Gosling
Ques 10 :
In PHP the error control operator is _______
(A) .
(B) @
(C) *
(D) &
Ques 11 :
what will be the output of below code ?
<? php
$str="3dollars";
$a=20;
$a+=$str;
print($a);
?>
(A) 320dollars
(B) 203dollars
(C) 23dollars
(D) 23
Ques 12 :
what will be the output of below code ?
<?php
function zz(& $x)
{
$x=$x+5;
}
?>
<? php
$x=10;
zz($x);
echo $x;
?>
(A) 0
(B) 5
(C) 10
(D) 15
Ques 13 :
what will be the output of below code ?
<?php
echo $_SERVER['REMOTE_ADDR'];
?>
(A) shows the IP address of the webserver
(B) shows the IP address of the local system
(C) shows the IP address of the visitor
(D) None of the above
Ques 14 :
what will be the output of below code ?
<?php
$x=dir(".");
while($y=$x->read())
{
echo $y."
"
}
$y->close();
?>
(A) display content of the all drives
(B) display a folder content
(C) display all folder names
(D) Parse error
Ques 15 :
what will be the output of below code ?
<?php
$qpt = 'QualityPointTechnologies';
echo preg_match("/^Quality/", $qpt);
?>
(A) 0
(B) 1
(C) Quality
(D) Null
Ques 16 :
what will be the output of below code ?
<?php
$test="3.5seconds";
settype($test,"double");
settype($test,"integer");
settype($test,"string");
print($test);
?>
(A) 3.5
(B) 3
(C) 3.5seconds
(D) 3seconds
Ques 17 :
what will be the output of below code ?
<?php
$x=array(2=>"mouse",7=>"keyboard");
$y=array_keys($x);
echo $y[1];
?>
(A) 2
(B) 7
(C) keyboard
(D) mouse
Ques 18 :
what will be the output of below code ?
<? php
$data="98.8degrees";
(double)$data;
(int)$data;
(string)$string;
echo $data;
?>
(A) 98
(B) 98.8
(C) 98.8degrees
(D) degrees
Ques 19 :
what will be the output of below code ?
$x="101.5degrees";
(double)$x;
(int)$x;
echo (string)$x;
?>
(A) 101.5
(B) degrees
(C) 101
(D) 101.5degrees
Ques 20 :
PHP is
(A) Partially cross-platform
(B) Truly cross-platform
(C) None of above
Submit Answer
Don't Refresh the Page !! ...