1--TEST-- 2Test session_get_cookie_params() function : basic functionality 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--INI-- 6session.cookie_lifetime=0 7session.cookie_path="/" 8session.cookie_domain="" 9session.cookie_secure=0 10session.cookie_httponly=0 11--FILE-- 12<?php 13 14ob_start(); 15 16/* 17 * Prototype : array session_get_cookie_params(void) 18 * Description : Get the session cookie parameters 19 * Source code : ext/session/session.c 20 */ 21 22echo "*** Testing session_get_cookie_params() : basic functionality ***\n"; 23 24var_dump(session_get_cookie_params()); 25var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE)); 26var_dump(session_get_cookie_params()); 27var_dump(session_set_cookie_params(1234567890, "/guff", "foo", TRUE, TRUE)); 28var_dump(session_get_cookie_params()); 29 30echo "Done"; 31ob_end_flush(); 32?> 33--EXPECTF-- 34*** Testing session_get_cookie_params() : basic functionality *** 35array(5) { 36 ["lifetime"]=> 37 int(0) 38 ["path"]=> 39 string(1) "/" 40 ["domain"]=> 41 string(0) "" 42 ["secure"]=> 43 bool(false) 44 ["httponly"]=> 45 bool(false) 46} 47bool(true) 48array(5) { 49 ["lifetime"]=> 50 int(3600) 51 ["path"]=> 52 string(5) "/path" 53 ["domain"]=> 54 string(4) "blah" 55 ["secure"]=> 56 bool(false) 57 ["httponly"]=> 58 bool(false) 59} 60bool(true) 61array(5) { 62 ["lifetime"]=> 63 int(1234567890) 64 ["path"]=> 65 string(5) "/guff" 66 ["domain"]=> 67 string(3) "foo" 68 ["secure"]=> 69 bool(true) 70 ["httponly"]=> 71 bool(true) 72} 73Done 74