Skip to content

count() of $a + $b over two bare array parameters answers garbage. #517

Closed

Description

@blacktrs

Summary

count() of $a + $b over two bare array parameters answers garbage.

Repro

<?php
function f(array $a, array $b) { return count($a + $b); }
echo f([], ['k' => 'v', 'j' => 'w']), "\n";

Expected (php)

2

Actual (manticore f6ba5fdd, Darwin arm64)


[exit code 138 — SIGBUS]

Tracking

Known-bug repro: tests/aot/repro/wrong/array_union_bare_array_params_count.php — bash tests/aot/xfail.sh -k array_union_bare_array_params_count 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 28, 2026
  2. added a commit that references this issue on Nov 9, 2026
    e89ac72
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