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