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-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)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC