Re: Re: [RFC] Callable constructors
| From: | Rowan Collins | Date: | Sat, 27 Feb 2016 19:01:35 +0000 |
| Subject: | Re: Re: [RFC] Callable constructors | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91444@lists.php.net to get a copy of this message | ||
On 26/02/2016 11:28, Andrea Faulds wrote:
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]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() ?).