Re: Fake Closure Comparison
| From: | Patrick ALLAERT | Date: | Mon, 12 Jul 2021 09:42:51 +0000 |
| Subject: | Re: Fake Closure Comparison | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115398@lists.php.net to get a copy of this message | ||
Le lun. 12 juil. 2021 à 09:51, Nikita Popov <nikita.ppv@gmail.com> a écrit :
> I'm also not sure where this would be actually useful (though I'm okay
> with including it, as the functionality itself seems sensible). As Patrick
> Allaert suggested this, maybe he can comment on some use cases.
>
I can't really see a useful case either, it was more rhetorical.
For a feeling I can't explain much, I was caring less about:
Closure::fromCallable('strlen') == Closure::fromCallable('strlen')
than:
strlen(...) == strlen(...)
I know they are technically identical, but I see the first construct as a
function call while the second one looks more like a language construct
"referencing" (sorry for not using a more adequate verb) the same function.
Anyway, I don't have a strong opinion on it.
Regards,
Patrick