1--TEST--
2Test session_id() function : error functionality
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9
10ob_start();
11
12echo "*** Testing session_id() : error functionality ***\n";
13
14var_dump(session_id());
15var_dump(session_id("!"));
16var_dump(session_id());
17@session_start();
18@session_destroy();
19
20var_dump(session_id());
21var_dump(session_id("?><"));
22var_dump(session_id());
23@session_start();
24@session_destroy();
25
26var_dump(session_id());
27var_dump(session_id("\xa3$%^&*()"));
28var_dump(session_id());
29@session_start();
30@session_destroy();
31
32var_dump(session_id());
33var_dump(session_id("\r\n"));
34var_dump(session_id());
35@session_start();
36@session_destroy();
37
38var_dump(session_id());
39var_dump(session_id("\0"));
40var_dump(session_id());
41@session_start();
42@session_destroy();
43
44var_dump(session_id());
45var_dump(session_id("\xac``@~:{>?><,./[]+--"));
46var_dump(session_id());
47@session_start();
48@session_destroy();
49
50echo "Done";
51ob_end_flush();
52?>
53--EXPECT--
54*** Testing session_id() : error functionality ***
55string(0) ""
56string(0) ""
57string(1) "!"
58string(0) ""
59string(0) ""
60string(3) "?><"
61string(0) ""
62string(0) ""
63string(8) "�$%^&*()"
64string(0) ""
65string(0) ""
66string(2) "
67"
68string(0) ""
69string(0) ""
70string(0) ""
71string(0) ""
72string(0) ""
73string(19) "�``@~:{>?><,./[]+--"
74Done
75