Zend PHP 5.3 Certification Exam
Functions and Arrays
Object Oriented Programming
Data Format & Types
Strings and Patterns
Databases and SQL
Web Features 1
Which of the following is an associative array of items uploaded by the current PHP script via the HTTP POST method?
Answer option A is correct.
The $_FILES is a super global associative array of items uploaded by the current PHP script via the HTTP POST method. 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 options D, C, and B are incorrect. $_REQUEST, $_ENV, and $_COOKIE does not provide the information about uploaded file.
© 2013 Zend PHP Certification Exam