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