1--TEST--
2Testing socket_get_status()
3--FILE--
4<?php
5
6for ($i=0; $i<100; $i++) {
7  $port = rand(10000, 65000);
8  /* Setup socket server */
9  $server = @stream_socket_server("tcp://127.0.0.1:$port");
10  if ($server) {
11    break;
12  }
13}
14
15var_dump(socket_get_status($server));
16fclose($server);
17
18?>
19--EXPECTF--
20array(7) {
21  ["stream_type"]=>
22  string(%d) "tcp_socket%S"
23  ["mode"]=>
24  string(2) "r+"
25  ["unread_bytes"]=>
26  int(0)
27  ["seekable"]=>
28  bool(false)
29  ["timed_out"]=>
30  bool(false)
31  ["blocked"]=>
32  bool(true)
33  ["eof"]=>
34  bool(false)
35}
36