Replies: 1 comment
-
Not a bug. Arrays are passed by value, objects by reference. |
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
-
In collection-type generics, when specifying the
int
type, if a narrower type, such asint<0, max>
, is passed, a type mismatch is indicated.This does not occur with
array
types. The inconsistency in behavior seems unintended and appears to be a bug. Is this correct?https://phpstan.org/r/9ad18a6e-554f-41bb-a595-235dd6d43d08
Beta Was this translation helpful? Give feedback.
All reactions