Most of your question can be answered by just visiting the setcookie() php manual.
Cookies cannot be verified until the next page load. You can manually set
$_COOKIE['test'] at the time you call setcookie although this value will not be persistent if the user's browser does not store the cookie.
Other than storing the values yourself, you can use headers_list() to return what headers will be, or have been, sent by PHP, but as stated earlier, this will not verify the cookie has actually been set on the user side.