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