Skip to content

Stdlib: get_defined_functions() exclude_disabled filter (#4942)#16890

Merged
PurHur merged 2 commits into
masterfrom
agent/issue-4942-get-defined-functions-exclude-disabled
Jul 6, 2026
Merged

Stdlib: get_defined_functions() exclude_disabled filter (#4942)#16890
PurHur merged 2 commits into
masterfrom
agent/issue-4942-get-defined-functions-exclude-disabled

Conversation

@PurHur

@PurHur PurHur commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add PHP 8.4 optional bool $exclude_disabled to get_defined_functions() on VM and JIT (forward 8.4 profile gate, same as get_declared_* exclude_deprecated).
  • Filter utf8_encode / utf8_decode from the internal bucket when enabled (php-src ZEND_ACC_DEPRECATED internals).
  • Wire named parameter exclude_disabled: via BuiltinParamNames + php-types patch.

php-src reference

  • ext/standard/basic_functions.cPHP_FUNCTION(get_defined_functions)
  • Zend/zend_API.c — deprecated internal function registration

Verification

# Issue repro (forward profile)
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_get_defined_functions_exclude_disabled.php
# ok

# Compliance (8.4 profile)
PHP_COMPILER_PROFILE=8.4 vendor/bin/phpunit --filter get_defined_functions_exclude
# OK (2 tests)

# Reference profile rejects arg
vendor/bin/phpunit --filter get_defined_functions_exclude_disabled_reference_profile
# OK

# Spine coverage sync
php script/check-selfhost-spine-coverage-sync.php
# OK

Closes #4942

Made with Cursor

PurHur and others added 2 commits July 6, 2026 11:36
Retarget bool assignOperandValue writes on string-typed phi slots, always
lower native string dim fetches via StringOffsetHelper (not list-unpack
hashtable stubs), and guard isset/empty hashtable paths; use a literal
DateException FQCN in ThrowableManifest for PHP 8.2 compile hosts.

Co-authored-by: Cursor <cursoragent@cursor.com>
PHP 8.4 optional bool omits ZEND_ACC_DEPRECATED internals (utf8_encode/decode)
from the internal bucket; VM + JIT + named args gated on forward 8.4 profile.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 072ffa2 into master Jul 6, 2026
1 check failed
@PurHur PurHur deleted the agent/issue-4942-get-defined-functions-exclude-disabled branch July 6, 2026 11:50
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.

Stdlib: get_defined_functions(bool $exclude_disabled) — PHP 8.4 filter (basic_functions.c)

1 participant