Skip to content

parse_str fails on nested arrays #8356

@belka-ew

Description

@belka-ew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions