--TEST-- setcookie() tests --DESCRIPTION-- --INI-- date.timezone=UTC --FILE-- count($headers)) { echo "Less headers are being sent than expected - aborting"; return; } do { if (strncmp(current($headers), 'Set-Cookie:', 11) !== 0) { continue; } if (current($headers) === current($expected)) { $i--; } else { echo "Header mismatch:\n\tExpected: " .current($expected) ."\n\tReceived: ".current($headers)."\n"; } next($expected); } while (next($headers) !== FALSE); echo ($i === 0) ? 'OK' : 'A total of '.$i.' errors found.'; --EXPECTHEADERS-- --EXPECT-- OK