On 26/02/2016 11:28, Andrea Faulds wrote:
Then we could add to that a special case for constructors:

- Callable::forConstructor(string $class_name)


Oh, that's quite a clean solution, I like that. Heck, no need for Callable, we already have ->getClosure() in Reflection. A modified version of that for constructors could work (ReflectionClass::getConstructorClosure() ?).

Reflection always feels to me like "the language doesn't really support this, but you can sort of cheat this way", but maybe that's a poor prejudice.

Regards,

--
Rowan Collins
[IMSoP]


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

Reply via email to