nerdexam
National_Instruments

200-500 · Question #217

1 <?php 2 setcookie('name1', 'value1', time() + 606024, '/'); 3 setcookie('name1', 'value2'); 4 ?> The web browser is configured to accept all cookies. How many cookies will be set by this script?

The correct answer is C. 2. See the full explanation below for the reasoning.

Question

1 <?php 2 setcookie('name1', 'value1', time() + 60*60*24, '/'); 3 setcookie('name1', 'value2'); 4 ?> The web browser is configured to accept all cookies. How many cookies will be set by this script?

Options

  • A0
  • B1
  • C2
  • D3

How the community answered

(41 responses)
  • A
    10% (4)
  • B
    5% (2)
  • C
    73% (30)
  • D
    12% (5)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice