Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16912 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23386 invoked by uid 1010); 26 Jun 2005 20:27:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23371 invoked from network); 26 Jun 2005 20:27:35 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2005 20:27:35 -0000 X-Host-Fingerprint: 82.165.35.142 thinkforge.org Linux 2.4/2.6 Received: from ([82.165.35.142:13114] helo=mail.mayflowersystem.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 8C/84-00424-5BF0FB24 for ; Sun, 26 Jun 2005 16:27:34 -0400 Received: (qmail 4462 invoked by uid 60010); 26 Jun 2005 20:27:31 -0000 Received: from 82.135.14.141 by mail (envelope-from , uid 89) with qmail-scanner-1.24 (uvscan: v4.3.20/v4362. spamassassin: 2.63. Clear:RC:1(82.135.14.141):. Processed in 0.534341 secs); 26 Jun 2005 20:27:31 -0000 Received: from unknown (HELO ?192.168.1.102?) (schlueter@mayflower.de@82.135.14.141) by 0 with (RC4-MD5 encrypted) SMTP; 26 Jun 2005 20:27:30 -0000 To: internals@lists.php.net Date: Sun, 26 Jun 2005 22:26:27 +0200 User-Agent: KMail/1.8 Cc: Jochen Hansper References: <1119816599.7082.37.camel@mframe.test-lab> In-Reply-To: <1119816599.7082.37.camel@mframe.test-lab> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200506262226.28314.johannes@php.net> Subject: Re: [PHP-DEV] httpOnly Cookies [tiny enhancement] From: johannes@php.net (Johannes Schlueter) Hi Jochen, On Sunday 26 June 2005 22:09, Jochen Hansper wrote: > setcookie("test","101",mktime()+60*60,"/","localhost",1) > setcookie("test","101",array(mktime()+60*60,"/","localhost",1)) > setcookie("test","101",array("0:0:0:1:0:0","/","localhost",1)) > setcookie("test","101",array(":::1","/","localhost",1)) I'd prefer if the index would either be a string or if there would be constants with the name since often I'm fine with the default settings but only want to set one option and imho setcookie("test","101",array("http_only" => 1)); and setcookie("test","101",array(COOKIE_HTTP_ONLY => 1)); are much better readable than setcookie("test","101",array(3 => 1)); or even setcookie("test","101",array(NULL, NULL, NULL,1)); btw. I would be a fan off adding named parameters if it can be done without any harm - that would be much nicer than arrays or many optional parameters. http://www.zend.com/zend/week/week190.php#Heading5 johannes