xref: /PHP-5.4/ext/session/tests/009.phpt (revision 8deefa87)
1--TEST--
2unset($_SESSION["name"]); test
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.use_cookies=0
7session.cache_limiter=
8session.serialize_handler=php
9session.save_handler=files
10--FILE--
11<?php
12error_reporting(E_ALL);
13
14session_id("abtest");
15
16### Phase 1 cleanup
17session_start();
18session_destroy();
19
20### Phase 2 $_SESSION["c"] does not contain any value
21session_id("abtest");
22session_start();
23var_dump($_SESSION);
24$_SESSION["name"] = "foo";
25var_dump($_SESSION);
26session_write_close();
27
28### Phase 3 $_SESSION["c"] is set
29session_start();
30var_dump($_SESSION);
31unset($_SESSION["name"]);
32var_dump($_SESSION);
33session_write_close();
34
35### Phase 4 final
36
37session_start();
38var_dump($_SESSION);
39session_destroy();
40?>
41--EXPECT--
42array(0) {
43}
44array(1) {
45  ["name"]=>
46  string(3) "foo"
47}
48array(1) {
49  ["name"]=>
50  string(3) "foo"
51}
52array(0) {
53}
54array(0) {
55}
56
57