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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to