Skip to content

__FUNCTION__ at the top level of a script is the empty string in php, here an internal symbol name #408

Closed

Description

@blacktrs

Summary

FUNCTION at the top level of a script is the empty string in php, here an internal symbol name.

Repro

<?php
var_dump(__FUNCTION__);

Expected (php)

string(0) ""

Actual (manticore 57b5de57, Darwin arm64)

string(13) "__mc_defaults"

Tracking

Known-bug repro: tests/aot/repro/wrong/top_level_function_constant_leaks_internal_name.php — bash tests/aot/xfail.sh -k top_level_function_constant_leaks_internal_name 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 23, 2026
  2. added a commit that references this issue on Oct 23, 2026
    01d1a58
  3. added a commit that references this issue on Oct 24, 2026
    a15ad0f
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