Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 1st argument $read of stream_select to be nullable #1031

Merged
merged 1 commit into from Feb 22, 2022

Conversation

niconoe-
Copy link
Contributor

Detected on vimeo/psalm#3036.

The documentation allows null here: https://www.php.net/manual/en/function.stream-select.php

@ondrejmirtes
Copy link
Member

Can you please show me where the documentation exactly states that? Thank you.

@niconoe-
Copy link
Contributor Author

I read it in the signature of the function:
it's ?array &$read,, not array &$read,

I also tested it in 3v4l.org: https://3v4l.org/rFifQ

null is actually a valid value for all of the 3 main arguments here. The hitcup is that you can't do the call with the 3 argument to null at the same time, but I guess this is something else not related to the functionMap.

@ondrejmirtes ondrejmirtes merged commit de5af47 into phpstan:master Feb 22, 2022
@ondrejmirtes
Copy link
Member

Thank you.

@niconoe- niconoe- deleted the patch-3 branch February 22, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants