Skip to content

by-ref foreach over an int list storing objects prints raw addresses as ints #71

Closed

Description

@blacktrs

Summary

by-ref foreach over an int list storing objects prints raw addresses as ints.

Repro

<?php
// item: 19b
$a = [1, 2];
foreach ($a as &$v) { $v = new stdClass; }
unset($v);
echo gettype($a[0]), "\n";

Expected (php)

object

Actual (manticore 09cb49fb, Darwin arm64)

integer

Tracking

Known-bug repro: tests/aot/repro/wrong/foreach_byref_int_list_object_store.php — bash tests/aot/xfail.sh -k foreach_byref_int_list_object_store 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
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