Skip to content

Conversation

zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Feb 28, 2024

Prior to PHP 8.0, date_sun_info() function could return false. However, this only applies if the function is called with the wrong arguments. Therefore, the PHP manual only described the return value prototype as array.

It seems that the use cases to which benevolent union should be applied in PHPStan are not yet documented, but this function may be one of them.

refs php/doc-en#3207

@ondrejmirtes ondrejmirtes merged commit b5db9f1 into phpstan:1.10.x Mar 4, 2024
@ondrejmirtes
Copy link
Member

Thank you!

@zonuexe zonuexe deleted the fix/type-date_sun_info branch March 6, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants