Logo

Php Questions Set 65:

Quiz Mode

Which function is useful for producing a Unix timestamp based on a given date and time?

1
2
3
4

Solution:

 To check whether a file was uploaded, you look in the _______ superglobal array.
 

1
2
3
4

Solution:

 Which one of the following is the right way to define a constant? 

1
2
3
4

Solution:

 To make the ImageHandler class portable you should create a separate file for it called __________ 

1
2
3
4

Solution:

 Which of the following is the right way to use the DateTime class? 

1
2
3
4

Solution:

Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?

i) fol
ii) fool
iii) fooool
iv) fooooool 

1
2
3
4

Solution:

Neglecting to set which of the following cookie will result in the cookie’s domain being set to the host name of the server which generated it. 

1
2
3
4

Solution:

 Which of the following directive determines the maximum amount of time that a PHP script will spend attempting to parse input before registering a fatal error?

1
2
3
4

Solution:

What will be the output of the following PHP code? 

 

<?php

$var=257;

$options = array("options"=>array ("min_range"=>0, "max_range"=>256));

if (!filter_var($var, FILTER_VALIDATE_INT, $options))

echo("Integer is not valid");

else

echo("Integer is valid");

?>

1
2
3
4

Solution: