moneybookers



Tuesday, September 7, 2010

odesk php test

Question: given below is a small php script:
class person{
Function getSal()
{
.....
.....
.....
}
}
Class emp extends person{
funciton GetSal()
{
???
}
}
?>
The getSal() of emp has to behave exactly as getSal() of person .which of the folliwing lines of code would you use to replce the

????
a. perent:: getSal();
b. person:: getSal();
c. parent:: getSal;
d. person:: getSal;

Ans: D

Question
what would be the output of the following code?



$stg='good day';
$stg= ucwords($stg);
echo $stg;
?>

a. good day
b. GOOD DAY
c. Good Day
d None of the above
Ans: C
Question:

which of the following command line interface constant is not defined in the cli sapi?

a. STDIN
b. STDOUT
c. STDPRT
d STDERR

 Ans:C

Question:

if the session_cache_expire()is not set,then by default the session cache will expire after:

a. 1 hr
b. 2 hr
c. 3 hr
d 4 hr

Ans:C
Question:


Which of the following is not a correct way of commenting in php?


a. //php comment
b. /*php comment*/
c. #php comment
d /# php comment

Ans:D

No comments:

Post a Comment