Patch 51056.phpt.txt for Streams related Bug #51056
Patch version 2010-03-11 01:04 UTC
Return to Bug #51056 |
Download this patch
Patch Revisions:
Developer: arnaud.lb@gmail.com
--TEST--
Bug #51056 fread() on blocking stream
--SKIPIF--
<?php
$sockets = @stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
if (!$sockets) die("skip");
?>
--FILE--
<?php
$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
fwrite($sockets[0], str_repeat("a", 1000));
var_dump(strlen(fread($sockets[1], 300)));
var_dump(strlen(fread($sockets[1], 300)));
var_dump(strlen(fread($sockets[1], 300)));
var_dump(strlen(fread($sockets[1], 300)));
--EXPECT--
int(300)
int(300)
int(300)
int(100)
--XFAIL--
|