1--TEST--
2Test session_name() function : variation
3--INI--
4session.save_path=
5session.name=PHPSESSID
6--SKIPIF--
7<?php include('skipif.inc'); ?>
8--FILE--
9<?php
10
11ob_start();
12
13/*
14 * Prototype : string session_name([string $name])
15 * Description : Get and/or set the current session name
16 * Source code : ext/session/session.c
17 */
18
19echo "*** Testing session_name() : variation ***\n";
20
21var_dump(session_name("\0"));
22var_dump(session_start());
23var_dump(session_name());
24var_dump(session_destroy());
25var_dump(session_name());
26
27var_dump(session_name("\t"));
28var_dump(session_start());
29var_dump(session_name());
30var_dump(session_destroy());
31var_dump(session_name());
32
33var_dump(session_name(""));
34var_dump(session_start());
35var_dump(session_name());
36var_dump(session_destroy());
37var_dump(session_name());
38
39echo "Done";
40ob_end_flush();
41?>
42--EXPECTF--
43*** Testing session_name() : variation ***
44string(9) "PHPSESSID"
45bool(true)
46string(0) ""
47bool(true)
48string(0) ""
49string(0) ""
50bool(true)
51string(1) "	"
52bool(true)
53string(1) "	"
54string(1) "	"
55bool(true)
56string(0) ""
57bool(true)
58string(0) ""
59Done
60
61