1--TEST--
2stream_get_contents() - Testing on socket with $maxlength
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') die("skip: non windows test");
6?>
7--FILE--
8<?php
9$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
10
11stream_set_timeout($sockets[1], 6000);
12
13fwrite($sockets[0], b"foo");
14var_dump(stream_get_contents($sockets[1], 3));
15
16?>
17--EXPECT--
18string(3) "foo"
19