Skip to content

Spreading a string-keyed array into a callee with fixed parameters and a variadic drops the keys of the variadic part. #574

Closed

Description

@blacktrs

Summary

Spreading a string-keyed array into a callee with fixed parameters and a variadic drops the keys of the variadic part.

Repro

<?php
function h(int $a = 0, mixed ...$rest) { return $a . json_encode($rest); }
echo h(...['a' => 7, 'z' => 1]), "\n";

Expected (php)

7{"z":1}

Actual (manticore eb872c25, Darwin arm64)

7[1]

Tracking

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