mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
19 lines
386 B
Plaintext
19 lines
386 B
Plaintext
|
--TEST--
|
||
|
stream_get_contents() - Testing on socket with $maxlength
|
||
|
--SKIPIF--
|
||
|
<?php
|
||
|
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip: non windows test");
|
||
|
?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
|
||
|
|
||
|
stream_set_timeout($sockets[1], 6000);
|
||
|
|
||
|
fwrite($sockets[0], b"foo");
|
||
|
var_dump(stream_get_contents($sockets[1], 3));
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
string(3) "foo"
|