Home>IT Tests>Questions>What is the output of the following code?
```
$cookie_name = 'test';
$cookie_value = 'test';
$cookie_expire = time() - 1;
setcookie($cookie_name, $cookie_value, $cookie_expire);
echo $_COOKIE[$cookie_name];
```
Question from the PHP5 test
What is the output of the following code? ``` $cookie_name = 'test'; $cookie_value = 'test'; $cookie_expire = time() - 1; setcookie($cookie_name, $cookie_value, $cookie_expire); echo $_COOKIE[$cookie_name]; ```
Medium
What operation allows to destroy a cookie previously created?
Author: Mathieu RobinStatus: PublishedQuestion passed 73 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about PHP
1
Validate a URL with a 'name' parameter whose value is 'John Doe'.1
What is the difference between an interface and a class in PHP?0
What are the two superglobals that are used to access the query string?0
What are the security risks of using the following code in PHP?0
What is the output of the following code?
$a = new stdClass();
$a->foo = 'bar';
unset($a);
echo $a->foo;