blob: 61fd0974e3b629ebb03dad27f08382409039b6f8 (
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
60
61
62
63
64
|
--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
session.save_handler=files
precision=14
--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_register("c");
unset($c);
$c = 3.14;
session_write_close();
unset($_SESSION);
unset($c);
### Phase 3 $_SESSION["c"] is set
session_start();
var_dump($c);
var_dump($_SESSION);
unset($c);
$c = 2.78;
session_write_close();
unset($_SESSION);
unset($c);
### Phase 4 final
session_start();
var_dump($c);
var_dump($_SESSION);
session_destroy();
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Function session_register() is deprecated in %s on line %d
float(3.14)
array(1) {
["c"]=>
&float(3.14)
}
float(3.14)
array(1) {
["c"]=>
&float(3.14)
}
|