Skip to content

Stdlib: ReflectionProperty::getAsymmetricVisibility() — instance + static (#5060, #6772) - #8199

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-5060-get-asymmetric-visibility
Jun 12, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/stdlib-5060-get-asymmetric-visibility

Conversation

@PurHur

@PurHur PurHur commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference: ext/reflection/php_reflection.c — reflection_property_get_asymmetric_visibility

PHP implementation: lib/VM/Builtin/ReflectionPropertyGetAsymmetricVisibility.php, ext/standard/VmReflection.php, lib/VM/BuiltinClasses.php

Closes #5060
Pairs with #6772 (static asymmetric props)

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro-maintainer/reflection_get_asymmetric_visibility_5060.php
vendor/bin/phpunit --filter reflection_property_asymmetric_visibility
php bin/compile.php -l test/repro-maintainer/reflection_get_asymmetric_visibility_5060.php
php bin/compile.php -l test/fixtures/aot/cases/reflection_property_asymmetric_visibility.phpt
'

Output (VM repro):

array ( 'get' => 256, 'set' => 1024, )   # private(set) instance
array ( 'get' => 256, 'set' => 1024, )   # private(set) static
NULL                                      # symmetric public $plain

PHPUnit: OK (1 test, 1 assertion) — reflection_property_asymmetric_visibility.phpt

AOT lint: exit 0 for repro + fixture

No new C runtime logic.

Made with Cursor

…and static props (#5060, #6772).

php-src: ext/reflection/php_reflection.c — returns null when symmetric, else get/set IS_* bitmasks via propertyVisibilityMeta (instance + static). Registers ReflectionProperty::IS_PUBLIC/IS_PROTECTED/IS_PRIVATE on the VM builtin class.
Co-authored-by: Cursor <cursoragent@cursor.com>
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: ReflectionProperty::getAsymmetricVisibility() — set/get masks (ext/reflection/php_reflection.c)

1 participant