Logo

Php Questions Set 15:

Quiz Mode

 How many constants does the DateTime class have? 

1
2
3
4

Solution:

[:alpha:] can also be specified as ________

1
2
3
4

Solution:

Which statement correctly outputs a line break in PHP?

1
2
3
4

Solution:

 Which function is responsible for sending a custom message to the system log?
 

1
2
3
4

Solution:

What will be the output of the following code?

<?php

    $str = "clue";

    $str .= "get";

    echo "$str";

?>

1
2
3
4

Solution:

What will be the output of the following PHP code?

<?php

$score=1234;

$scoreboard=(array) $score;

echo $scoreboard[0];

?>

1
2
3
4

Solution:

 Which one of the following function outputs the contents of a string variable to the specified resource?

1
2
3
4

Solution:

 Which of the following may NOT be required to be installed on your computer so as to run PHP script? 

1
2
3
4

Solution:

 What will be the output of the following PHP code? 

 

<?php

$state = array ("Karnataka", "Goa", "Tamil Nadu",

"Andhra Pradesh");

echo (array_search ("Tamil Nadu", $state) );

?>

1
2
3
4

Solution:

 

If we have two compare two strings which of the following function/functions can you use?

i) strcmp()
ii) strcasecmp()
iii) strspn()
iv) strcspn()

1
2
3
4

Solution: