Skip to content

Assignment of an array element counts as a read #307

@sirbrillig

Description

@sirbrillig

Discovered in #305, an assignment of one element of an array does not get recorded as a write to that variable.

$foo = &$bar;
$foo['key'] = 1; // This counts as a "read" of $foo when it should be a "write".

I think in most cases this ends up not being an issue since clearly all the tests are passing but it could be the source of subtle bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions