Annotation of embedaddon/php/ext/standard/tests/streams/stream_get_contents_002.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: stream_get_contents() - Testing on socket with $maxlength
3: --SKIPIF--
4: <?php
5: if (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:
11: stream_set_timeout($sockets[1], 6000);
12:
13: fwrite($sockets[0], b"foo");
14: var_dump(stream_get_contents($sockets[1], 3));
15:
16: ?>
17: --EXPECT--
18: string(3) "foo"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>