-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#4609Description
Bug report
The associated code snippet triggers an error which seems to be making a wrong assumption that functions will return determinstic values.
- Replacing time() with mt_rand() makes the issue go away
- Replacing time() with a function call to a user-defined function self::foo() exhibits the same issue
Code snippet that reproduces the problem
https://phpstan.org/r/44b1d4c8-3b9d-46b9-85d7-5a35b8c45ca4
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
I've been super impressed with phpstan so far. I've been working my way through the levels and have discovered and fixed many small bugs along the way. In addition to the core functionality, I appreciate the extra attention to developer ergonomics (readable output, thoughtful error messages, sanity checks on ignore regexes, etc). Feels a step above other linters in this regard.
Metadata
Metadata
Assignees
Labels
No labels