logoalt Hacker News

pwdisswordfishytoday at 3:40 PM1 replyview on HN

And how is Closure::fromCallable('trim') recommended by the article any better in that respect?

    $ php8.4 -r "var_dump(Closure::fromCallable('trim') === Closure::fromCallable('trim'));"
    bool(false)

Replies

joe_hoyletoday at 5:06 PM

It is not better, this is a problem with the first-class callable syntax altogether.