This works in Safari, FF, Chrome, etc.:
setrawcookie('mycookie', 'myvalue', time() + 31556926);
This does not work in FF or Chrome:
setrawcookie('mycookie', 'myvalue', time() + 31556926, '/', '.localhost');
I have been using PHP for quite some time, and have never seen this behavior before.