[php-src] Issue #7943: Nested Attributes values are not static through engine life
| From: | aurimasniekis | Date: | Fri, 14 Jan 2022 20:55:12 +0000 |
| Subject: | [php-src] Issue #7943: Nested Attributes values are not static through engine life | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239016@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7943
Comment Author: aurimasniekis
Yes, I understand you can do stupid things, but my point was more about
getArguments
which returns values for that attribute, and the constructor of that attribute doesn't really
matter what it does.
My main point is that if you pass something as an argument to an attribute constructor, in this
case, some random object (the random_int was just to prove that object changes), the reflection of
that attribute when using getArguments should return the same result at least for the
same ReflectionAttribute class instance, or best for that engine lifetime.
Because if you try to interact with that object instance, and then call somewhere
getArguments again it will be replaced as it's not the same instance.