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

Array returned from time_nanosleep() isn't seen to have the correct contents #8097

Closed
nach-code opened this issue Oct 2, 2022 · 2 comments · Fixed by phpstan/phpstan-src#1787

Comments

@nach-code
Copy link

time_nanosleep() might return an array. If it does, it contains seconds and nanoseconds. https://www.php.net/manual/en/function.time-nanosleep.php

However, PHPStan thinks accessing this is an error:

https://phpstan.org/r/e1b5c862-77ed-479e-abca-ba6a77e3df76

Offset 'nanoseconds' does not exist on array{int<0, max>, int<0, max>}.
Offset 'seconds' does not exist on array{int<0, max>, int<0, max>}.

@ondrejmirtes
Copy link
Member

Fixed by phpstan/phpstan-src#1787

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants