Skip to content

A 'Class::method' string callable invoked through an erased slot returns 0 instead of calling the static method. #234

Closed

Description

@blacktrs

Summary

A 'Class::method' string callable invoked through an erased slot returns 0 instead of calling the static method.

Repro

<?php
class EC { public static function ce(string $s): string { return "ce:" . $s; } }
function g(mixed $cb) { return $cb("v"); }
echo g("EC::ce"), "\n";
echo call_user_func("EC::ce", "w"), "\n";

Expected (php)

ce:v
ce:w

Actual (manticore cb98ce3a, Darwin arm64)

0
ce:w

Tracking

Known-bug repro: tests/aot/repro/wrong/string_static_method_callable_erased.php — bash tests/aot/xfail.sh -k string_static_method_callable_erased 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 13, 2026
  2. added a commit that references this issue on Oct 14, 2026
    1f79b38
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