Skip to content

A builtin function named by a runtime string is called as if undefined: $f("b"), $f(...) and call_user_func($f) all answer 0 or empty. #230

Closed

Description

@blacktrs

Summary

A builtin function named by a runtime string is called as if undefined: $f("b"), $f(...) and call_user_func($f) all answer 0 or empty.

Repro

<?php
function ids(mixed $v): mixed { return $v; }
$f = ids("strtoupper");
echo $f("b"), "\n";
$g = $f(...);
echo $g("c"), "\n";
echo call_user_func($f, "d"), "\n";

Expected (php)

B
C
D

Actual (manticore 7d12f44d, Darwin arm64)

0

0

Tracking

Known-bug repro: tests/aot/repro/wrong/runtime_string_callable_naming_builtin.php — bash tests/aot/xfail.sh -k runtime_string_callable_naming_builtin 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 2 commits that reference this issue on Oct 14, 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