Skip to content

Rebinding a reference from an array element to a local ($w = &$a[0]; $w = &$x; $w = 3) writes a tagged cell into the local. #441

Closed

Description

@blacktrs

Summary

Rebinding a reference from an array element to a local ($w = &$a[0]; $w = &$x; $w = 3) writes a tagged cell into the local.

Repro

<?php
function t(): void { $arr = [1, 2]; $x = 0; $w = &$arr[0]; $w = &$x; $w = 3; var_dump($arr[0], $x); }
t();

Expected (php)

int(1)
int(3)

Actual (manticore 1b3f58ac, Darwin arm64)

int(1)
int(-4222124650659837)

Tracking

Known-bug repro: tests/aot/repro/wrong/ref_rebind_elem_alias_to_local.php — bash tests/aot/xfail.sh -k ref_rebind_elem_alias_to_local reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions