Skip to content

Stdlib: get_defined_functions(exclude_disabled:) on reference profile (#16902)#16910

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-16902-get-defined-functions-reference-profile
Jul 6, 2026
Merged

Stdlib: get_defined_functions(exclude_disabled:) on reference profile (#16902)#16910
PurHur merged 1 commit into
masterfrom
agent/issue-16902-get-defined-functions-reference-profile

Conversation

@PurHur

@PurHur PurHur commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix regression from Stdlib: get_defined_functions() exclude_disabled filter (#4942) #16890: supportsGetDefinedFunctionsExcludeDisabled() was gated on PHP 8.4 get_declared_* exclude_deprecated, but Zend 8.2+ already exposes exclude_disabled on get_defined_functions().
  • Gate on REFERENCE_PHP_VERSION >= 8.2 so BuiltinParamNames registers the named parameter on the default (no PHP_COMPILER_PROFILE) VM path.
  • Add reference-profile maintainer repro beside the forward-profile repro.

Root cause

version_compare(languageProfileVersion(), '8.4.0', '>=') is false on the 8.4.0-dev reference profile, so named exclude_disabled: hit "Unknown named parameter" despite VM/JIT implementation already present (#16890).

php-src reference

ext/standard/basic_functions.cPHP_FUNCTION(get_defined_functions) / $exclude_disabled

PHP implementation

  • lib/CompilerVersion.phpsupportsGetDefinedFunctionsExcludeDisabled()
  • lib/BuiltinParamNames.php — existing exclude_disabled registration (unchanged)
  • ext/standard/get_defined_functions_.php + VmReflection.php — existing handler (unchanged)

Verification

php bin/vm.php test/repro/maintainer_gap_get_defined_functions_exclude_disabled_reference.php
# ok

php bin/vm.php test/repro/maintainer_gap_get_defined_functions_exclude_disabled.php
# ok

source script/php-env.sh && vendor/bin/phpunit --filter 'get_defined_functions_exclude_disabled' test/compliance/VMTest.php
# OK (2 tests)

source script/php-env.sh && vendor/bin/phpunit --filter 'CompilerVersionGateTest::testSupportsGetDefinedFunctionsExcludeDisabled'
# OK (2 tests)

Closes #16902

Made with Cursor

…profile (#16902)

PHP 8.2+ exposes optional exclude_disabled unlike get_declared_* exclude_deprecated
(8.4-only). Gate BuiltinParamNames on REFERENCE_PHP_VERSION so named args work without
PHP_COMPILER_PROFILE=8.4.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 3051f04 into master Jul 6, 2026
@PurHur PurHur deleted the agent/issue-16902-get-defined-functions-reference-profile branch July 6, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: get_defined_functions(exclude_disabled:) — unknown named parameter on reference profile (re-#4942, ext/standard/basic_functions.c)

1 participant