click below
click below
Normal Size Small Size show me how
App dev Mod 7&8
| Question | Answer |
|---|---|
| an associative array that by default contains the contents of $_GET, $_POST, and $_COOKIE | $_REQUEST |
| PCRE means Perl Compatible Regular Expression | False |
| PCRE function starts with prg_ | False |
| Which of the following code will delete cookies | setcookie(“name1”,”value1”,time()-60); |
| are mechanism for storing data on the server itself. | Session |
| is the time that a user spends at your Web site. | Session |
| $_POST is an associative array of variables passed to the current script via this method | HTTP POST |
| Regular Expression pattern modifier for extra analysis of pattern | S |
| $_COOKIE is an associative array of variables passed to the current script via | HTTP |
| is an array containing information such as headers, paths, and script locations. | $_SERVER |
| Regular Expression Meta characters Symbol for item range (a,b or c) | [abc] |
| Regular expression example that will match the word hello | ‘/hello/’ |
| an associative array of variables passed to the current script via the HTTP method. | $_GET |
| Entries were created by the web server | $_SERVER |
| Regular Expression pattern modifier for ignore case | i |
| an associative array containing session variables available to the script | $_SESSION |
| Regular Expression Meta characters Symbol for mark the end of a string | $ |
| Regular Expression Meta characters Symbol for Zero or one ‘a’ character. Equals to a(0,1) | a? |
| an associative array of variables passed to the current script via the environment method | $_ENV |
| contains the filename of the currently executing script. | PHP_SELF |
| Performs a regular expression match | preg_match() |
| session_destroy() gets rid of all the session variable information that’s stored in the session file | True |
| what is P in PCRE | Percl |
| Sample name of a session $_SESSION[myvalue]; Check the code if it is Valid or Invalid | Invalid In PHP, when you use a string key inside an associative array (like $_SESSION), you must enclose the key in quotes. |
| PCRE function starts with | preg_ |
| Regular Expression Meta characters Symbol for group elements | () |
| Regular Expression Meta characters Symbol for mark the start of a string | ^ |
| the session_destroy() statement does not affect the variables set on the current page | True |
| Regular Expression Meta characters Symbol for not in range (every character except a,b or c) | [^abc] |
| Regular Expression Meta characters symbol for any non white-space character | \S |
| users can refuse to accepts cookies. | True |
| Regular Expression Meta characters symbol for any non alpha numeric characters | \W |
| $_GET is an associative array variables passed to the current script via | URL |
| Regular Expression Meta characters symbol for any white-space character | \s |
| managing cookies can be done using function | setcookie() |
| Regular Expression Meta characters symbol for exactly two of ‘a’ | a{2} |
| <form action=”<?php echo $_SERVER[‘PHP_SELF’] ?>” method=”post”></form> | Invalid |
| Cookies are small amount of information containing | variable=value |
| Regular Expression Meta characters symbol for any alpha numeric character plus underscore. Equals to [A-Za-z0-9_] | \w |
| Regular Expression Meta characters Symbol for white-space character | \s |
| Regular Expression Meta characters Symbol for zero or more of ‘a’ | a* |
| Use to unset session variables | unset() |
| Which of the following will show cookies after 1 minute | setcookie(“name1”,”value1”,time()+60); |
| Function used to open a session | session_start() |
| Regular Expression Meta characters symbol for any non-digits equal to [^0-9] | \D |
| Session is more secure than cookies and can store much more information. | True |
| Syntax to unset session variables | unset($_SESSION[‘varname’]) |
| What is C in PCRE | Compatible |
| Regular Expression also known as regex or regexpr | False |
| an associative array of variables passed to the current script via HTTP Cookies | $_COOKIE |
| Function used to close the session | session_destroy() |
| Regular Expression Meta characters symbol for up to five of ‘a’ | a{,5} |
| Syntax to display cookies | print_r($_COOKIE) |
| Regular Expression is also known as | regex |
| Regular Expression Meta characters Symbol for matches any single character | . |
| session_start() is always set at the end of each web page | False |
| What is E in PCRE | Expression |
| Regular Expression Meta characters symbol for any digits equal to [0-9] | \d |
| What is R in PCRE | Regular |
| Regular Expression Meta characters Symbol for Boolean OR | | |