php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51056
Patch 51056-3.phpt.txt revision 2010-03-12 13:46 UTC by arnaud dot lb at gmail dot com
Patch 51056-2.phpt.txt revision 2010-03-11 01:05 UTC by arnaud dot lb at gmail dot com
Patch 51056.phpt.txt revision 2010-03-11 01:04 UTC by arnaud dot lb at gmail dot com

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--
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC