Since arbitrary static variable initializers have been implemented, uopz_get_static() may no longer retrieve initializer values of static variables, because these may now be only initialized when the function is called the first time. ReflectionFunction::getStaticVariables() has exactly the same BC breaking behavior, as outlined in the RFC. For example, see tests/007.phpt (aka. my name is Bond, Broken Bond), which now fails with the following diff:
As you see, for static initializers which cannot be evaluated at compile time, NULL is reported as initial value, same as for unitialized static variables.
Since this cannot be fixed, we should fix the test, and document the issue.
Since arbitrary static variable initializers have been implemented,
uopz_get_static()
may no longer retrieve initializer values of static variables, because these may now be only initialized when the function is called the first time.ReflectionFunction::getStaticVariables()
has exactly the same BC breaking behavior, as outlined in the RFC. For example, see tests/007.phpt (aka. my name is Bond, Broken Bond), which now fails with the following diff:As you see, for static initializers which cannot be evaluated at compile time,
NULL
is reported as initial value, same as for unitialized static variables.Since this cannot be fixed, we should fix the test, and document the issue.