Zend PHP 5 Certification v6.0 (200-500)

Page:    1 / 15   
Total 219 questions

Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?

  • A. $_GET['ALL']
  • B. $_SERVER['QUERY']
  • C. $_SERVER['QUERY_STRING']
  • D. $_ENV['QUERY']
  • E. $QUERY_STRING


Answer : C

How to read a single line, no matter how long from an file opened in the example below?
$fp = fopen("my_file.txt", "w");

  • A. fgets($fp);
  • B. fgets($fp, -1);
  • C. fread($fp, 1024);
  • D. fgetss($fp);
  • E. None of the above


Answer : D

Which of the following statements are NOT true?

  • A. SimpleXML allows removal of attributes.
  • B. SimpleXML allows addition of new attributes.
  • C. SimpleXML allows removal of nodes.
  • D. SimpleXML allows addition of new nodes.
  • E. None of the above


Answer : E

Which of the following statements are correct? (Choose 2)

  • A. It is possible to specify more than one __autoload function
  • B. __autoload receives the missing class name all lowercased
  • C. __autoload is being called for missing interfaces
  • D. Inside __autoload missing classes trigger __autoload


Answer : C,D

How many elements does the array $pieces contain after the following piece of code has been executed?
$pieces = explode("/", "///");

  • A. 0
  • B. 3
  • C. 4
  • D. 5


Answer : C

What does the __FILE__ constant contain?

  • A. The filename of the current script.
  • B. The full path to the current script.
  • C. The URL of the request made.
  • D. The path to the main script.


Answer : B

You want to parse a URL into its single parts. Which function do you choose?

  • A. parse_url()
  • B. url_parse()
  • C. get_url_parts()
  • D. geturlparts()


Answer : A

How can a SimpleXML object be converted to a DOM object?

  • A. dom_import_simplexml()
  • B. dom_export_simplexml()
  • C. simplexml_import_dom()
  • D. SimpleXML2Dom()
  • E. None of the above.


Answer : A

What PHP function can be used to remove a local file?

  • A. A) rmdir()
  • B. B) unlink()
  • C. C) rm()
  • D. D) delete()
  • E. E) delete_file()


Answer : B

What DOM method is used to load HTML files?

  • A. load()
  • B. loadXML()
  • C. loadHTML()
  • D. loadHTMLFile()


Answer : D

What is the output of the following script?
1 <?php
2 function fibonacci (&$x1 = 0, &$x2 = 1)
3 {
4 $result = $x1 + $x2;
5 $x1 = $x2;
6 $x2 = $result;
8 return $result;
9 }
11 for ($i = 0; $i < 10; $i++) {
12 echo fibonacci() . ',';
13 }
14 ?>

  • A. An error
  • B. 1,1,1,1,1,1,1,1,1,1,
  • C. 1,1,2,3,5,8,13,21,34,55,
  • D. Nothing


Answer : B

What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));

  • A. array("A","B",C",1,2,3)
  • B. array(1,2,3,"A","B",C")
  • C. array("A"=>1,"B"=>2,"C"=>3)
  • D. array(1=>"A",2=>"B",3=>"C")
  • E. array(1,2,3)


Answer : C

Which of the following functions can help prevent session fixation vulnerabilities?

  • A. magic_quotes_gpc()
  • B. strip_tags()
  • C. addslashes()
  • D. session_regenerate_id()


Answer : D

How can you determine if magic_quotes_gpc is enabled? (Choose 2)

  • A. Use the get_magic_quotes() function.
  • B. Using the get_magic_quotes_runtime() function.
  • C. Use the get_magic_quotes_gpc() function.
  • D. Using ini_get('magic_quotes_gpc').
  • E. Using ini_get('magic_quotes').


Answer : A,D

You want to present the following formatted number: "999.000.000,00". Which function call is correct?

  • A. print format_number(999000000);
  • B. print number_format(999000000);
  • C. print number_format(999000000, 2, ',', '.');
  • D. print number_format(999000000, 2);
  • E. print_number(999000000, 2, ',', '.')


Answer : C

Page:    1 / 15   
Total 219 questions