Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend 200-710 Exam - Topic 8 Question 106 Discussion

How can you determine whether a PHP script has already sent cookies to the client?
C) Use the headers_sent() function
A) Use $_COOKIE
B) Use the getcookie() function
D) Use JavaScript to send a second HTTP request

Zend 200-710 Exam - Topic 8 Question 106 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 106
Topic #: 8
[All 200-710 Questions]

How can you determine whether a PHP script has already sent cookies to the client?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Nada
4 days ago
I’m not convinced about C. What if there’s a better method?
upvoted 0 times
...
Pansy
10 days ago
Wait, can you really use JavaScript for this? Seems odd.
upvoted 0 times
...
Barney
15 days ago
Totally agree with C! It's the only way to know for sure.
upvoted 0 times
...
Rachael
20 days ago
I thought A was the way to go. $_COOKIE just reads them, right?
upvoted 0 times
...
Kenneth
25 days ago
C is the right answer! headers_sent() checks if cookies were sent.
upvoted 0 times
...
Mignon
1 month ago
I vaguely recall that using JavaScript for this kind of check isn't standard practice, so I doubt D is correct.
upvoted 0 times
...
Jerlene
1 month ago
I thought $_COOKIE was just for retrieving cookies, not checking if they were sent. This is confusing!
upvoted 0 times
...
Madalyn
1 month ago
I remember practicing a question about checking if headers were sent, so I feel like C might be the right choice.
upvoted 0 times
...
Carole
2 months ago
I think we talked about the headers_sent() function in class, but I'm not entirely sure how it relates to cookies.
upvoted 0 times
...

Save Cancel