go to bug id or search bugs for
From manual page: http://www.php.net/function.setcookie
Clarification is desired to make it clear to me what happens if the domain argument is not passed to this function.
If I set session.cookie_domain in a php.ini file, will it come into play?
If I leave it blank, will php use a variable like $_SERVER["SERVER_NAME"]?
Add a Patch
Add a Pull Request
Having looked at the source code setcookie() doesn't appear to set the domain unless one is passed to the function, this can be tested by executing this simple script:
setcookie('testing', '123', time()+60*60*24*30, '/');
 => X-Powered-By: PHP/5.4.21
 => Set-Cookie: testing=123; expires=Wed, 26-Mar-2014 22:27:59 GMT; path=/
The argument is optional, it's in square brackets so for me I think the documentation is fine (just my opinion though!)