Why are methods considered pure by default? #10642
-
https://phpstan.org/r/e1a03b33-ddb0-46a7-8d07-a3bcaeffa869 My expectation is that PHPStan would expect the method to randomly return anything possible by default. And only if I somehow flag it as somehow pure it will consider all subsequent calls with same parameters the same. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Doh! https://phpstan.org/blog/remembering-and-forgetting-returned-values |
Beta Was this translation helpful? Give feedback.
-
You can also watch me talk about this for a few minutes starting here :) https://youtu.be/AFjr3RlDOZQ?si=4KskkbnK8IXn7mWz&t=1729 |
Beta Was this translation helpful? Give feedback.
You can also watch me talk about this for a few minutes starting here :) https://youtu.be/AFjr3RlDOZQ?si=4KskkbnK8IXn7mWz&t=1729