Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_str fails on nested arrays #8356

Closed
belka-ew opened this issue Nov 12, 2022 · 1 comment · Fixed by phpstan/phpstan-src#1994
Closed

parse_str fails on nested arrays #8356

belka-ew opened this issue Nov 12, 2022 · 1 comment · Fixed by phpstan/phpstan-src#1994

Comments

@belka-ew
Copy link

Bug report

type in the out parameter of parse_str doesn't support nested arrays and doesn't represent the real value used by the function.

Code snippet that reproduces the problem

<?php
parse_str('filter[x][y]=0', $output);
print $output['filter']['x']['y'];

https://phpstan.org/r/6f758dd6-6fff-4bb7-b80c-c74946f01e74

Expected output

The issue is reported incorrectly since PHP 8.1 executes this code without errors.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant