Show Menu
Cheatography

SuperGlobals Cheat Sheet (DRAFT) by

superglobals

This is a draft cheat sheet. It is a work in progress and is not finished yet.

$_SERVER superg­lobal

Which of the following items in the $_SERVER superg­­lobal are important for authen­­ti­c­ating the client when using HTTP Basic authen­­ti­c­a­tion? (Choose 2)

A. PHP_AU­­TH­_TYPE
B. PHP_AU­­TH­_­P­AS­­SWORD
C. PHP_AU­­TH­_­D­IGEST
D. PHP_AU­­TH_PW
E. PHP_AU­­TH­_USER
Answer : D,E

cookie (global)

Please Provide the name of the super-­­global variable where all the inform­­ation about cookies are available
Answer : $_COOKIE, $_COOK­­IE[\], _COOKIE, _COOKIE[\]

cookie (global)

Please Provide the name of the super-­­global variable where all the inform­­ation about cookies are available
Answer : $_COOKIE, $_COOK­­IE[\], _COOKIE, _COOKIE[\]
 

super-­global

What super-­­global should be used to access inform­­ation about uploaded files via a POST request?

A. $_SERVER
B. $_ENV
C. $_POST
D. $_FILES
E. $_GET
Answer : D

Superg­lobals

Which of the following superg­­lobals does not necess­­arily contain data from the client?

A. $_POST
B. $_SESSION
C. $_GET
D. $_SERVER
Answer : B