1--TEST--
2stream_select allows null for microsecond timeout if timeout is null
3--FILE--
4<?php
5
6$read = [fopen(__FILE__, 'r')];
7$write = null;
8$except = null;
9
10error_reporting(-1);
11set_error_handler(function ($errno, $errstr) {
12    print $errno . " " . $errstr . "\n";
13});
14
15stream_select($read, $write, $except, null, null);
16var_dump($read);
17
18print "\n";
19
20stream_select($read, $write, $except, null, 0);
21
22stream_select($read, $write, $except, null, 1);
23?>
24--EXPECTF--
25array(1) {
26  [0]=>
27  resource(%d) of type (stream)
28}
29
30
31Fatal error: Uncaught ValueError: stream_select(): Argument #5 ($microseconds) must be null when argument #4 ($seconds) is null in %s
32Stack trace:
33#0 %s stream_select(Array, NULL, NULL, NULL, 1)
34#1 {main}
35%s
36