blob: 7e13ab27e34db1ea06c39a3cee2d85f2d50ad569 (
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
57
58
59
|
--TEST--
bug compatibility: unset($c) with enabled register_globals
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.cache_limiter=
register_globals=1
session.bug_compat_42=1
session.serialize_handler=php
--FILE--
<?php
error_reporting(E_ALL);
session_id("abtest");
### Phase 1 cleanup
session_start();
session_destroy();
### Phase 2 $HTTP_SESSION_VARS["c"] does not contain any value
session_id("abtest");
session_register("c");
unset($c);
$c = 3.14;
session_write_close();
unset($HTTP_SESSION_VARS);
unset($c);
### Phase 3 $HTTP_SESSION_VARS["c"] is set
session_start();
var_dump($c);
var_dump($HTTP_SESSION_VARS);
unset($c);
$c = 2.78;
session_write_close();
unset($HTTP_SESSION_VARS);
unset($c);
### Phase 4 final
session_start();
var_dump($c);
var_dump($HTTP_SESSION_VARS);
session_destroy();
?>
--EXPECT--
float(3.14)
array(1) {
["c"]=>
&float(3.14)
}
float(3.14)
array(1) {
["c"]=>
&float(3.14)
}
|