Logo

Php Questions Set 6:

Quiz Mode

The DateTime class has ___ methods.

1
2
3
4

Solution:

  How many predefined exceptions does SPL provide access to? 

1
2
3
4

Solution:

For defining a variable without any data, which value must use to assign them?

Solution:

 What is the default value of max_input_time directive?

1
2
3
4

Solution:

What will be the output of the following PHP code?

<?php

$num = 1;

$num1 = 2;

print $num . "+" . $num1;

?>

1
2
3
4

Solution:

 What will be the output of the following PHP code? (If say date is 22/06/2013.) 

 

<?php

printf( date("t") );

?>

1
2
3
4

Solution:

 Which one of the following PHP function is used to determine a file’s last access time?
 

1
2
3
4

Solution:

 The practice of creating objects based on predefined classes is often referred to as?

1
2
3
4

Solution:

 What will be the output of the following PHP code? 

 

<?php

function foo($msg)

{

   echo "$msg";

}

$var1 = "foo";

$var1("will this work");

?>

1
2
3
4

Solution: