Skip to content

Fix array fill keys for decimal int strings#6077

Open
BackEndTea wants to merge 1 commit into
phpstan:2.2.xfrom
BackEndTea:fix-decimal-int-string-array-fill-keys
Open

Fix array fill keys for decimal int strings#6077
BackEndTea wants to merge 1 commit into
phpstan:2.2.xfrom
BackEndTea:fix-decimal-int-string-array-fill-keys

Conversation

@BackEndTea

Copy link
Copy Markdown
Contributor

assertType("array<string, null>", array_fill_keys($foo, null));
assertType("array<int, null>", array_fill_keys($bar, null));
assertType("array<'foo', null>", array_fill_keys($baz, null));
assertType("array<numeric-string&uppercase-string, null>", array_fill_keys($floats, null));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is in line with actual PHP behaviour, but i'm not sure if this result is intentional for BC break purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

array_fill_keys does not convert decimal-int-string to int

1 participant