Zend PHP 5.3 Certification Exam
Functions and Arrays
Object Oriented Programming
Data Format & Types
Strings and Patterns
Databases and SQL
Web Features 1
In which of the following ways will you receive data from a Web page if you do not know how data is sent?
Answer option A is correct.
You can use the $_REQUEST super global variable to receive data from a Web page if you do not know how data is sent. The $_REQUEST is an associative array that by default contains the contents of $_GET, $_POST and $_COOKIE information. Supergobal variables are built in arrays in PHP, which are available in any scope. A user can access a superglobal array within a function or method without using the global keyword. There are following superglobal arrays in PHP:
It contains keys and values set as browser cookies.
It contains keys and values set by the script's shell context.
It contains information about uploaded files.
It contains keys and values submitted to the script using the HTTP get method.
It contains keys and values submitted to the script using the HTTP post method.
It contains a combined array containing values from the $_GET, $_POST, and $_COOKIE superglobal arrays.
It contains all global variables associated with the current script.
Answer option B is incorrect. The $_GET super global array contains keys and values submitted to the script using the HTTP get method.
Answer option C is incorrect. The $_POST super global array contains keys and values submitted to the script using the HTTP post method.
Answer option D is incorrect. This is not a valid PHP method.
© 2013 Zend PHP Certification Exam