You have the answer.
This creates a cookie called TestCookie with a value of "myValue", it will expire 1 hour from its creation. The website/domain is example.com and the folder path you're in is /~rasmus/.
More information on setcookie here:
http://php.net/manual/en/function.setcookie.php