Skip to content

Appending null to a raw int array through a reference stores raw 0, so isset() of that slot is true (php: false). #88

Closed

Description

@blacktrs

Summary

Appending null to a raw int array through a reference stores raw 0, so isset() of that slot is true (php: false).

Repro

<?php
$gi = [1, 2];
$r = &$gi;
$r[] = null;
var_dump(isset($gi[2]), isset($r[2]), $r[2] ?? 'm');

Expected (php)

bool(false)
bool(false)
string(1) "m"

Actual (manticore 3dc6ed40, Darwin arm64)

bool(true)
bool(true)
int(0)

Tracking

Known-bug repro: tests/aot/repro/wrong/ref_int_array_null_append_isset.php — bash tests/aot/xfail.sh -k ref_int_array_null_append_isset 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 5, 2026
  2. added a commit that references this issue on Oct 13, 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