Patch 51056-3.phpt.txt for Streams related Bug #51056
Patch version 2010-03-12 13:46 UTC
Return to Bug #51056 |
Download this patch
Patch Revisions:
Developer: arnaud.lb@gmail.com
--TEST--
Bug #51056 fread() on blocking stream (3)
--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", 900));
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(0)
|