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("test"));
15var_dump(session_id());
16var_dump(session_id("1234567890"));
17var_dump(session_id());
18var_dump(session_start());
19var_dump(session_id("1234567890"));
20var_dump(session_destroy());
21var_dump(session_id());
22
23echo "Done";
24ob_end_flush();
25?>
26--EXPECTF--
27*** Testing session_id() : error functionality ***
28string(0) ""
29string(4) "test"
30string(4) "test"
31string(10) "1234567890"
32bool(true)
33
34Warning: session_id(): Session ID cannot be changed when a session is active in %s on line %d
35bool(false)
36bool(true)
37string(0) ""
38Done
39