1--TEST-- 2Test session_set_cookie_params() function : variation 3--INI-- 4session.cookie_domain=foo 5--SKIPIF-- 6<?php include('skipif.inc'); ?> 7--FILE-- 8<?php 9 10ob_start(); 11 12/* 13 * Prototype : void session_set_cookie_params(int $lifetime [, string $path [, string $domain [, bool $secure [, bool $httponly]]]]) 14 * Description : Set the session cookie parameters 15 * Source code : ext/session/session.c 16 */ 17 18echo "*** Testing session_set_cookie_params() : variation ***\n"; 19 20var_dump(ini_get("session.cookie_domain")); 21var_dump(session_set_cookie_params(3600, "/path", "blah")); 22var_dump(ini_get("session.cookie_domain")); 23var_dump(session_start()); 24var_dump(ini_get("session.cookie_domain")); 25var_dump(session_set_cookie_params(3600, "/path", "guff")); 26var_dump(ini_get("session.cookie_domain")); 27var_dump(session_destroy()); 28var_dump(ini_get("session.cookie_domain")); 29var_dump(session_set_cookie_params(3600, "/path", "foo")); 30var_dump(ini_get("session.cookie_domain")); 31 32echo "Done"; 33ob_end_flush(); 34?> 35--EXPECTF-- 36*** Testing session_set_cookie_params() : variation *** 37string(3) "foo" 38bool(true) 39string(4) "blah" 40bool(true) 41string(4) "blah" 42 43Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in %s on line 18 44bool(false) 45string(4) "blah" 46bool(true) 47string(4) "blah" 48bool(true) 49string(3) "foo" 50Done 51