The page1 output is merely an optimistic representation of a cookie that may come to exist at some point in the future, after the page has finished processing, the response has been sent, the client has received the instruction to create said cookie, and has followed it as expected. Only the client can tell you what cookies actually exist in the end. You could try adding this at the bottom of the page to get a more accurate picture:
<script>
alert(document.cookie);
</script>