1--TEST--
2Test session_set_cookie_params() function : variation
3--INI--
4session.cookie_lifetime=3600
5--EXTENSIONS--
6session
7--SKIPIF--
8<?php include('skipif.inc'); ?>
9--FILE--
10<?php
11
12ob_start();
13
14echo "*** Testing session_set_cookie_params() : variation ***\n";
15
16var_dump(ini_get("session.cookie_lifetime"));
17var_dump(session_set_cookie_params(3600));
18var_dump(ini_get("session.cookie_lifetime"));
19
20var_dump(session_start());
21var_dump(ini_get("session.cookie_lifetime"));
22var_dump(session_set_cookie_params(1800));
23var_dump(ini_get("session.cookie_lifetime"));
24var_dump(session_destroy());
25
26var_dump(ini_get("session.cookie_lifetime"));
27var_dump(session_set_cookie_params(1234567890));
28var_dump(ini_get("session.cookie_lifetime"));
29
30echo "Done";
31ob_end_flush();
32?>
33--EXPECTF--
34*** Testing session_set_cookie_params() : variation ***
35string(4) "3600"
36bool(true)
37string(4) "3600"
38bool(true)
39string(4) "3600"
40
41Warning: session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active (started from %s on line %d) in %s on line %d
42bool(false)
43string(4) "3600"
44bool(true)
45string(4) "3600"
46bool(true)
47string(10) "1234567890"
48Done
49