Sloppy parameter handling of some reflection methods

  107723
October 28, 2019 15:15 cmbecker69@gmx.de ("Christoph M. Becker")
Hi,

while working on the arginfo stubs for ext/reflection, I've noticed that
several methods do very sloppy parameter handling, if called for static
properties/methods.  ReflectionMethod::getClosure(),
ReflectionProperty::getValue() and ::isInitialized() don't do any
parameter checks at all, while ReflectionProperty::setValue() accepts
arbitrary zvals as first parameter, and simply ignores the argument.

If we wanted to be extra strict, we could do zpp_none() checks for the
first three methods, and only accept a $value argument for the fourth.
For BC reasons as well as simplifying code which deals with non-static
properties/methods as well, we could also support an optional NULL, and
maybe even an (arbitrary) object of the respective type.

Thoughts?

Thanks,
Christoph