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

false is not recognized as the result of exec() in PHP 7.* #10431

Closed
jacekkarczmarczyk opened this issue Jan 14, 2024 · 3 comments
Closed

false is not recognized as the result of exec() in PHP 7.* #10431

jacekkarczmarczyk opened this issue Jan 14, 2024 · 3 comments
Labels
Milestone

Comments

@jacekkarczmarczyk
Copy link

Bug report

For PHP 7.2-7.4 phpstan returns an error when comparing the result of exec() to false. It works fine for PHP 8.*. I don't see anything in php docs saying that the return type is different for PHP 7 and 8

https://www.php.net/manual/en/function.exec.php

Code snippet that reproduces the problem

https://phpstan.org/r/3fe47f5e-f27b-4b4e-9594-5e7e0e6e8313

Expected output

No error

Did PHPStan help you today? Did it make you happy in any way?

Yup!

@ondrejmirtes
Copy link
Member

Please follow this issue template next time: https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&projects=&template=Function_signature_mismatch.md

Please send a pull request in phpstan/phpstan-src that updates file resources/functionMap.php instead. Thank you.

@ondrejmirtes
Copy link
Member

Fixed phpstan/phpstan-src#2974

Copy link

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 Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants