nerdexam
Zend

200-710 · Question #21

Which of the following will set a 10 seconds read timeout for a stream?

The correct answer is D. stream_set_timeout($stream, 10). See the full explanation below for the reasoning.

I/O

Question

Which of the following will set a 10 seconds read timeout for a stream?

Options

  • Aini_set("default_socket_timeout", 10);
  • Bstream_read_timeout($stream, 10);
  • CSpecify the timeout as the 5th parameter to the fsockopen() function used to open a stream
  • Dstream_set_timeout($stream, 10);
  • ENone of the above

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    10% (4)
  • D
    83% (35)
  • E
    5% (2)

Topics

#stream timeout#stream_set_timeout#socket streams#I/O functions

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice