Example:
<?php
setcookie('test_cookie', '1', time()+3600, '/', $_SERVER['SERVER_NAME']);
echo $_SERVER['SERVER_NAME']; // outputs: entwicklung.hausfux
Afaik the dot is a wildcard selector.
This causes login problems if you are trying to login into subdomain websites.