Replies: 1 comment
-
|
It's currently hard to track this and not report code that's valid but in the future this should be possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
loops are the obvious performance bottlenecks we see in applications every day.
sometimes loops are slower then necessary, because method/function-calls which do not depend on a variable, which changes with iterations is used within the loop, but could just be moved outside the loop.
pseudo-code:
since the method is pure, invoking it on every iteration is unnecessary and the code could be rewritten to
should phpstan error when pure functions/methods are used within a loop, but do not depend on its iterations?
another benefit of moving code outside a loop, is more readable code
Beta Was this translation helpful? Give feedback.
All reactions