Skip to content

Stdlib: forward-profile phantom function_exists gates (#16086) - #16093

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-16086-forward-profile-phantom-registration
Jul 4, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-16086-forward-profile-phantom-registration

Conversation

@PurHur

@PurHur PurHur commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Split callable registration (supports*, languageProfileVersion) from introspection advertisement (advertises*, stable VERSION) for forward-profile builtins.
  • function_exists() / extension_loaded('bcmath') now match Zend 8.2 reference probes even when PHP_COMPILER_PROFILE=8.4 enables calling fpow, mb_str_pad, and bc*.
  • PHP implementation: ext/standard/BuiltinIntrospectionPolicy.php (php-src: ext/standard/basic_functions.c function table).

Closes #16086

Verification

./script/docker-exec.sh -- bash -lc '
  export PHP_COMPILER_PROFILE=8.4
  php bin/vm.php test/repro/maintainer_gap_fpow_phantom_registration.php
  php bin/vm.php test/repro/maintainer_gap_mb_str_pad_phantom_function_exists.php
  php bin/vm.php test/repro/maintainer_gap_bcmath_phantom_registration.php
  php bin/vm.php test/compliance/cases/stdlib/forward_profile_phantom_introspection.phpt
'
# ok / ok / ok / ok + callable=1

source script/php-env.sh
vendor/bin/phpunit --filter ForwardProfilePhantomIntrospection test/unit/ForwardProfilePhantomIntrospectionTest.php
vendor/bin/phpunit --filter forward_profile_phantom_introspection test/compliance/VMTest.php
vendor/bin/phpunit --filter CompilerVersionBuiltinAdvertisement test/unit/CompilerVersionBuiltinAdvertisementTest.php
# OK (2+1+58 tests)

Made with Cursor

Separate callable registration (languageProfileVersion) from introspection
advertisement (stable VERSION) so PHP_COMPILER_PROFILE=8.4 keeps fpow,
mb_str_pad, and bcmath callable while matching Zend 8.2 phantom gates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 1fde95d into master Jul 4, 2026
@PurHur
PurHur deleted the agent/issue-16086-forward-profile-phantom-registration branch July 4, 2026 15:15
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: PHP 8.4 forward-profile gated builtins — function_exists/extension_loaded true on reference profile (ext/standard)

1 participant