1--TEST--
2Test session_id() function : basic functionality
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : string session_id([string $id])
12 * Description : Get and/or set the current session id
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_id() : basic functionality ***\n";
17
18var_dump(session_id());
19var_dump(session_id("test"));
20var_dump(session_id());
21var_dump(session_id("1234567890"));
22var_dump(session_id());
23// Turn off strice mode, since it does not allow uninitialized session ID
24ini_set('session.use_strict_mode',false);
25var_dump(session_start());
26var_dump(session_id());
27var_dump(session_destroy());
28var_dump(session_id());
29
30echo "Done";
31ob_end_flush();
32?>
33--EXPECTF--
34*** Testing session_id() : basic functionality ***
35string(0) ""
36string(0) ""
37string(4) "test"
38string(4) "test"
39string(10) "1234567890"
40bool(true)
41string(10) "1234567890"
42bool(true)
43string(0) ""
44Done
45
46