summaryrefslogtreecommitdiff
path: root/ext/session/tests/027.phpt
blob: 63828522fb5b83f1d6f738383980cd2e1121f8e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--TEST--
unset($_SESSION["name"]); should work
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.use_strict_mode=0
session.cache_limiter=
session.serialize_handler=php
session.save_handler=files
--FILE--
<?php
error_reporting(E_ALL);

session_id("abtest");

### Phase 1 cleanup
session_start();
session_destroy();

### Phase 2 $_SESSION["c"] does not contain any value
session_id("abtest");
session_start();
var_dump($_SESSION);
$_SESSION["name"] = "foo";
var_dump($_SESSION);
session_write_close();

### Phase 3 $_SESSION["c"] is set
session_start();
var_dump($_SESSION);
unset($_SESSION["name"]);
var_dump($_SESSION);
session_write_close();

### Phase 4 final

session_start();
var_dump($_SESSION);
session_destroy();
?>
--EXPECT--
array(0) {
}
array(1) {
  ["name"]=>
  string(3) "foo"
}
array(1) {
  ["name"]=>
  string(3) "foo"
}
array(0) {
}
array(0) {
}