1--TEST-- 2GH-16889 (stream_select() timeout useless for pipes on Windows) 3--FILE-- 4<?php 5$desc = [ 6 ["pipe", "r"], 7 ["pipe", "w"], 8 ["pipe", "w"], 9]; 10// open process which won't produce output for 10s 11$proc = proc_open([PHP_BINARY, "-r", "sleep(10); echo 'finish';"], $desc, $pipes); 12$read = [$pipes[1]]; 13$write = null; 14$except = null; 15$time0 = microtime(true); 16// select STDOUT pipe of process for 1ms 17if (stream_select($read, $write, $except, 0, 1000)) { 18 var_dump(fread($read[0], 1)); 19} 20// avoid blocking of finishing the test process 21proc_terminate($proc); 22$time1 = microtime(true); 23var_dump($time1 - $time0 < 1); 24?> 25--EXPECT-- 26bool(true) 27