Skip to content

sprintf() with a fixed argument before a spread formats the spread pack itself as "Array". #360

Closed

Description

@blacktrs

Summary

sprintf() with a fixed argument before a spread formats the spread pack itself as "Array".

Repro

<?php
$c = "ab";
echo sprintf("%s %s!", $c, ...[$c]), "\n";
printf("%d-%d\n", 1, ...[2]);

Expected (php)

ab ab!
1-2

Actual (manticore 0c83227d, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

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