Programming - PHP
You Are Here :: Home > Programming > PHP- General Questions
7. |
Which of the following type cast is not correct??
|
A. |
real |
B.
|
double |
C.
|
decimal
|
D.
|
boolean
|
|
Answer: Option c
Explanation:
|
8. |
What will be the output of the following code?
$var = 10;
function fn ()
{
$var = 20;
return $var;
}
fn ();
echo $var;?
|
A. |
10 |
B.
|
20 |
C.
|
Undefined Variable
|
D.
|
Syntax Error
|
|
Answer: Option A
Explanation:
|
9. |
which of the following are the valid PHP data types??
|
A. |
resource |
B.
|
null,string |
C.
|
boolean
|
D.
|
all the above
|
|
Answer: Option D
Explanation:
|
10. |
which of the following characters are taken care of by htmlspecialchars??
|
A. |
< |
B.
|
> and & |
C.
|
single quote,double quote
|
D.
|
f. All of the above
|
|
Answer: Option D
Explanation:
|
11. |
What do you infer from the following code??
|
A. |
Only first character will be recognised and new line will be inserte |
B.
|
Last will not be recognised and only first two parts will come in new lines. |
C.
|
All the will work and text will be printed on respective new lines.
|
D.
|
All will be printed on one line irrespective of the
|
|
Answer: Option D
Explanation:
|
12. |
which of the following is a correct declaration??
|
A. |
static $varb = array(1,'val',3); |
B.
|
static $varb = 1+(2*90); |
C.
|
static $varb = sqrt(81);
|
D.
|
static $varb = new Object;
|
|
Answer: Option D
Explanation:
|
« prev
next »