Logo

Php Questions Set 47:

Quiz Mode

Which version of PHP introduced the E_STRICT error level?

1
2
3
4

Solution:

Which symbol must be prefixed with the variable to create a PHP variable?

1
2
3
4

Solution:

Which PHP function can be used to compress a string?

1
2
3
4

Solution:

  Which one of the following function checks for the existence of DNS records?
 

1
2
3
4

Solution:

 Which superglobal stores a variety of information pertinent to a file uploaded to the server via a PHP script? 

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:

 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:

Which of the following statements about Constructors in PHP is/are true?

1
2
3
4

Solution:

 

Which of the following PHP statements will output Hello World on the screen?

 i) echo ("Hello World");

 ii) print ("Hello World");

 iii) printf ("Hello World");

 iv) sprintf ("Hello World"); 

1
2
3
4

Solution:

What will be the output of the following PHP code?

<?php

$var = 300;

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

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

echo("Integer is not valid");

else

echo("Integer is valid");

?>

1
2
3
4

Solution: