History log of /PHP-8.2/ext/standard/tests/streams/stream_select_null_usec.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# a4ed1716 27-Oct-2021 Damjan Cvetko

Accept null and 0 for microseconds argument in stream_select()

PHP 8.0 did not accept null for the usec argument, PHP 8.1 only
accepts null. This means you can't easily write code compat

Accept null and 0 for microseconds argument in stream_select()

PHP 8.0 did not accept null for the usec argument, PHP 8.1 only
accepts null. This means you can't easily write code compatible
with both without triggering at least a deprecation warning.
Drop the deprecation warning for now.

Closes GH-7617.

show more ...


# 59d5b3dd 22-Apr-2021 Niklas Keller

Accept null for microseconds argument in stream_select() (#6879)

The deprecation of passing null is thrown otherwise.

If the timeout is calculated conditionally before calling strea

Accept null for microseconds argument in stream_select() (#6879)

The deprecation of passing null is thrown otherwise.

If the timeout is calculated conditionally before calling stream_select(), passing to avoid the deprecation seems unreasonable, example:

https://github.com/amphp/amp/blob/7d4bbc6e0b47c6bb39b6cce1a4b5942e0c5125fb/lib/Loop/NativeDriver.php#L286

Also enforce that if $seconds is null, then $microseconds should be null as well. However 0 is still accepted (with deprecation) for backwards compatibility.

show more ...