1--TEST-- 2Test session_get_cookie_params() function : variation 3--EXTENSIONS-- 4session 5--SKIPIF-- 6<?php include('skipif.inc'); ?> 7--INI-- 8session.cookie_lifetime=0 9session.cookie_path="/" 10session.cookie_domain="" 11session.cookie_secure=0 12session.cookie_httponly=0 13session.cookie_samesite="" 14--FILE-- 15<?php 16 17ob_start(); 18 19echo "*** Testing session_get_cookie_params() : variation ***\n"; 20 21var_dump(session_get_cookie_params()); 22ini_set("session.cookie_lifetime", 3600); 23var_dump(session_get_cookie_params()); 24ini_set("session.cookie_path", "/path"); 25var_dump(session_get_cookie_params()); 26ini_set("session.cookie_domain", "foo"); 27var_dump(session_get_cookie_params()); 28ini_set("session.cookie_secure", TRUE); 29var_dump(session_get_cookie_params()); 30ini_set("session.cookie_httponly", TRUE); 31var_dump(session_get_cookie_params()); 32ini_set("session.cookie_samesite", "foo"); 33var_dump(session_get_cookie_params()); 34 35echo "Done"; 36ob_end_flush(); 37?> 38--EXPECT-- 39*** Testing session_get_cookie_params() : variation *** 40array(6) { 41 ["lifetime"]=> 42 int(0) 43 ["path"]=> 44 string(1) "/" 45 ["domain"]=> 46 string(0) "" 47 ["secure"]=> 48 bool(false) 49 ["httponly"]=> 50 bool(false) 51 ["samesite"]=> 52 string(0) "" 53} 54array(6) { 55 ["lifetime"]=> 56 int(3600) 57 ["path"]=> 58 string(1) "/" 59 ["domain"]=> 60 string(0) "" 61 ["secure"]=> 62 bool(false) 63 ["httponly"]=> 64 bool(false) 65 ["samesite"]=> 66 string(0) "" 67} 68array(6) { 69 ["lifetime"]=> 70 int(3600) 71 ["path"]=> 72 string(5) "/path" 73 ["domain"]=> 74 string(0) "" 75 ["secure"]=> 76 bool(false) 77 ["httponly"]=> 78 bool(false) 79 ["samesite"]=> 80 string(0) "" 81} 82array(6) { 83 ["lifetime"]=> 84 int(3600) 85 ["path"]=> 86 string(5) "/path" 87 ["domain"]=> 88 string(3) "foo" 89 ["secure"]=> 90 bool(false) 91 ["httponly"]=> 92 bool(false) 93 ["samesite"]=> 94 string(0) "" 95} 96array(6) { 97 ["lifetime"]=> 98 int(3600) 99 ["path"]=> 100 string(5) "/path" 101 ["domain"]=> 102 string(3) "foo" 103 ["secure"]=> 104 bool(true) 105 ["httponly"]=> 106 bool(false) 107 ["samesite"]=> 108 string(0) "" 109} 110array(6) { 111 ["lifetime"]=> 112 int(3600) 113 ["path"]=> 114 string(5) "/path" 115 ["domain"]=> 116 string(3) "foo" 117 ["secure"]=> 118 bool(true) 119 ["httponly"]=> 120 bool(true) 121 ["samesite"]=> 122 string(0) "" 123} 124array(6) { 125 ["lifetime"]=> 126 int(3600) 127 ["path"]=> 128 string(5) "/path" 129 ["domain"]=> 130 string(3) "foo" 131 ["secure"]=> 132 bool(true) 133 ["httponly"]=> 134 bool(true) 135 ["samesite"]=> 136 string(3) "foo" 137} 138Done 139