Trying to retrieve an array element with "false" as index should raise an error in strict mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the PHPStan playground example linked in the issue and inspect how the strict rules handle array access. Determine where a false index is analyzed, then verify that strict mode reports an error for this case without changing non-strict behavior.
Written by the indexing model from the issue text.
Description
Feature request
Hello,
It would be nice that PHPStan raise an erreur in strict mode when trying to access an array element with "false" as index.
See
https://phpstan.org/r/1f14913d-366e-4b45-9b4b-e747fc48b7dd
Best regards,
Eric
Did PHPStan help you today? Did it make you happy in any way?
No response
- Dominant language
- PHP
- Stars
- 711
- Forks
- 62
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpstan-strict-rules
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phpstan/phpstan-strict-rules#317 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phpstan/phpstan-strict-rules#316 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
phpstan/phpstan-strict-rules#298 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
phpstan/phpstan-strict-rules#289 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
phpstan/phpstan-strict-rules#283 · 6 comments ·
All issues in phpstan/phpstan-strict-rules
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
extension/Commercial needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
crazy-goat/rabbit-stream#753 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opensourcepos/opensourcepos#4743 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenConext/OpenConext-engineblock#2129 ·
Maintainers usually reply within 3 days