1--TEST--
2Test session_name() function : variation
3--INI--
4session.save_path=
5session.name=PHPSESSID
6session.save_handler=files
7--EXTENSIONS--
8session
9--SKIPIF--
10<?php include('skipif.inc'); ?>
11--FILE--
12<?php
13
14ob_start();
15
16echo "*** Testing session_name() : variation ***\n";
17
18var_dump(session_name("\0"));
19var_dump(session_start());
20var_dump(session_name());
21var_dump(session_destroy());
22var_dump(session_name());
23
24var_dump(session_name("\t"));
25var_dump(session_start());
26var_dump(session_name());
27var_dump(session_destroy());
28var_dump(session_name());
29
30var_dump(session_name(""));
31var_dump(session_start());
32var_dump(session_name());
33var_dump(session_destroy());
34var_dump(session_name());
35
36echo "Done";
37ob_end_flush();
38?>
39--EXPECTF--
40*** Testing session_name() : variation ***
41string(9) "PHPSESSID"
42bool(true)
43string(9) "PHPSESSID"
44bool(true)
45string(9) "PHPSESSID"
46string(9) "PHPSESSID"
47
48Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d
49bool(true)
50string(1) "	"
51bool(true)
52string(1) "	"
53
54Warning: session_name(): session.name "" cannot be numeric or empty in %s on line %d
55string(1) "	"
56
57Warning: session_start(): session.name cannot contain any of the following '=,;.[ \t\r\n\013\014' in %s on line %d
58bool(true)
59string(1) "	"
60bool(true)
61string(1) "	"
62Done
63