1--TEST-- 2Bug #74090 stream_get_contents maxlength>-1 returns empty string on windows 3--SKIPIF-- 4<?php 5if (getenv("SKIP_ONLINE_TESTS")) { die('skip: online test'); } 6if (getenv("SKIP_SLOW_TESTS")) { die('skip: slow test'); } 7?> 8--FILE-- 9<?php 10$data = base64_decode("1oIBAAABAAAAAAAAB2V4YW1wbGUDb3JnAAABAAE="); 11$fd = stream_socket_client("udp://8.8.8.8:53", $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT); 12stream_set_blocking($fd, 0); 13stream_socket_sendto($fd,$data); 14sleep(1); 15$ret = stream_get_contents($fd,65565); 16var_dump(strlen($ret) > 0); 17stream_socket_shutdown($fd,STREAM_SHUT_RDWR); 18?> 19==DONE== 20--EXPECTF-- 21bool(true) 22==DONE== 23