Skip to content

Named arguments passed to an undefined method are not collected into __call's $arguments under their names. #477

Closed

Description

@blacktrs

Summary

Named arguments passed to an undefined method are not collected into __call's $arguments under their names.

Repro

<?php
class M { public function __call($n, $a) { return $n . ':' . json_encode($a); } }
echo (new M)->go('x', b: 'or', c: 3), "\n";

Expected (php)

go:{"0":"x","b":"or","c":3}

Actual (manticore de54ecd6, Darwin arm64)

go:["x","or",3]

Tracking

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