Re: httpOnly Cookies [tiny enhancement]

From: Date: Sun, 26 Jun 2005 20:26:27 +0000
Subject: Re: httpOnly Cookies [tiny enhancement]
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-16912@lists.php.net to get a copy of this message
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

« previous php.internals (#16912) next »