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