nerdexam
National_Instruments

200-500 · Question #155

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.

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

(26 responses)
  • A
    4% (1)
  • B
    12% (3)
  • D
    81% (21)
  • E
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice