1--TEST-- 2Test session_decode() function : variation 3--SKIPIF-- 4<?php include('skipif.inc'); ?> 5--FILE-- 6<?php 7 8ob_start(); 9 10/* 11 * Prototype : string session_decode(void) 12 * Description : Decodes session data from a string 13 * Source code : ext/session/session.c 14 */ 15 16echo "*** Testing session_decode() : variation ***\n"; 17 18var_dump(session_start()); 19var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;")); 20var_dump($_SESSION); 21var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;")); 22var_dump($_SESSION); 23var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;")); 24var_dump($_SESSION); 25var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;")); 26var_dump($_SESSION); 27var_dump(session_decode("foo|a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}guff|R:1;blah|R:1;")); 28var_dump($_SESSION); 29var_dump(session_destroy()); 30 31echo "Done"; 32ob_end_flush(); 33?> 34--EXPECTF-- 35*** Testing session_decode() : variation *** 36bool(true) 37bool(true) 38array(3) { 39 ["foo"]=> 40 &array(3) { 41 [0]=> 42 int(1) 43 [1]=> 44 int(2) 45 [2]=> 46 int(3) 47 } 48 ["guff"]=> 49 &array(3) { 50 [0]=> 51 int(1) 52 [1]=> 53 int(2) 54 [2]=> 55 int(3) 56 } 57 ["blah"]=> 58 &array(3) { 59 [0]=> 60 int(1) 61 [1]=> 62 int(2) 63 [2]=> 64 int(3) 65 } 66} 67bool(true) 68array(3) { 69 ["foo"]=> 70 &array(3) { 71 [0]=> 72 int(1) 73 [1]=> 74 int(2) 75 [2]=> 76 int(3) 77 } 78 ["guff"]=> 79 &array(3) { 80 [0]=> 81 int(1) 82 [1]=> 83 int(2) 84 [2]=> 85 int(3) 86 } 87 ["blah"]=> 88 &array(3) { 89 [0]=> 90 int(1) 91 [1]=> 92 int(2) 93 [2]=> 94 int(3) 95 } 96} 97bool(true) 98array(3) { 99 ["foo"]=> 100 &array(3) { 101 [0]=> 102 int(1) 103 [1]=> 104 int(2) 105 [2]=> 106 int(3) 107 } 108 ["guff"]=> 109 &array(3) { 110 [0]=> 111 int(1) 112 [1]=> 113 int(2) 114 [2]=> 115 int(3) 116 } 117 ["blah"]=> 118 &array(3) { 119 [0]=> 120 int(1) 121 [1]=> 122 int(2) 123 [2]=> 124 int(3) 125 } 126} 127bool(true) 128array(3) { 129 ["foo"]=> 130 &array(3) { 131 [0]=> 132 int(1) 133 [1]=> 134 int(2) 135 [2]=> 136 int(3) 137 } 138 ["guff"]=> 139 &array(3) { 140 [0]=> 141 int(1) 142 [1]=> 143 int(2) 144 [2]=> 145 int(3) 146 } 147 ["blah"]=> 148 &array(3) { 149 [0]=> 150 int(1) 151 [1]=> 152 int(2) 153 [2]=> 154 int(3) 155 } 156} 157bool(true) 158array(3) { 159 ["foo"]=> 160 &array(3) { 161 [0]=> 162 int(1) 163 [1]=> 164 int(2) 165 [2]=> 166 int(3) 167 } 168 ["guff"]=> 169 &array(3) { 170 [0]=> 171 int(1) 172 [1]=> 173 int(2) 174 [2]=> 175 int(3) 176 } 177 ["blah"]=> 178 &array(3) { 179 [0]=> 180 int(1) 181 [1]=> 182 int(2) 183 [2]=> 184 int(3) 185 } 186} 187bool(true) 188Done 189 190