Skip to content

Stdlib: withhold phantom attribute_exists/class_meth_exists/unitenum_exists/crc32c (#22584)#22625

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-22584-phantom-builtins
Jul 23, 2026
Merged

Stdlib: withhold phantom attribute_exists/class_meth_exists/unitenum_exists/crc32c (#22584)#22625
PurHur merged 1 commit into
masterfrom
agent/stdlib-22584-phantom-builtins

Conversation

@PurHur

@PurHur PurHur commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

PHP implementation

  • lib/CompilerVersion.php — gates always false for the four phantoms; new isAnonymousClass gate
  • ext/standard/BuiltinIntrospectionPolicy.php, ext/reflection/Module.php, script/capability-syntax-lib.php
  • Compliance: reflection_probe_builtins_phantom_forward_84.phpt + test/repro/phantom_builtins_profile84.php

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/phantom_builtins_profile84.php → all =0
  • vendor/bin/phpunit --filter reflection_probe_builtins_phantom|Php84ReflectionProbe|… → OK
  • make north-star5-verify-fast → OK (fingerprint a6745ffd…)
  • ./script/check-generated-docs.sh → OK
  • Native AOT phpc build of the repro — blocked on this host by pre-existing LLVM module verify (htmlspecialchars/valueDelref signature mismatch; same class of failure as bootstrap-selfhost-link)

Closes #22584

…exists/crc32c (#22584)

These builtins are absent from php-src basic_functions.stub.php; stop
registering/advertising them on all php-src-strict profiles (including
PROFILE=8.4). Split isAnonymousClass onto its own forward-profile gate.
Restamp gen-0 lowering fingerprint after CompilerVersion.php edit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 62d04ca into master Jul 23, 2026
1 check failed
@PurHur

PurHur commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Cleanup hygiene

Deleting remote branch agent/stdlib-22584-phantom-builtins.

Reason: PR merged into master (#22625 / 62d04caea); issue #22584 closed; no open PR on this head.

Open PR #22717 (agent/issue-22642-gen0-refresh-oom) and release/v1.1.0-dev left untouched.

@PurHur
PurHur deleted the agent/stdlib-22584-phantom-builtins branch July 23, 2026 19:44
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: attribute_exists/class_meth_exists/unitenum_exists/crc32c advertised on PROFILE=8.4 — absent from php-src (re-#14995/#17138, ext/standard)

1 participant