From b4a2de7aceb7f4a5c524add602cb47f9746f219c Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Fri, 10 Jul 2026 11:38:49 +0800 Subject: [PATCH] feat(native): add native property assignment operation with class constant - Introduce NativePropertyAssignOpClassConstBox class with flags property - Implement clearPublic method using bitwise AND assignment operator - Add native_property_assign_op_class_const function for testing - Demonstrate bitwise operation with ReflectionClassConstant::IS_PUBLIC - Support integer type declaration for flags property - Enable --- .../native-property-assign-op-class-const.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 phpunit/code/native-property-assign-op-class-const.php diff --git a/phpunit/code/native-property-assign-op-class-const.php b/phpunit/code/native-property-assign-op-class-const.php new file mode 100644 index 00000000..c28ee39d --- /dev/null +++ b/phpunit/code/native-property-assign-op-class-const.php @@ -0,0 +1,18 @@ +flags &= ~ReflectionClassConstant::IS_PUBLIC; + return $this->flags; + } +} + +function native_property_assign_op_class_const(): int +{ + $box = new NativePropertyAssignOpClassConstBox(); + return $box->clearPublic(); +}