On Monday 30 March 2026 02:32:24 (+02:00), Osama Aldemeery wrote:
>
> That said, I could be wrong about any of this, and in which case I would
> genuinely appreciate you correcting my reasoning.
Before that you wrote earlier that this has come up multiple times before.
As far as I understand the idea, has it been explored with an interface
ordinarily declared in PHP scripts, and if so, what were the outcomes?
And thinking, stringable before PHP's exclusive internal use came out of
PHP scripts, namely framework scripts from Symfony land IIRC. If you draw
the relation to that interface, was there a recent review if/how it went?
Would be interesting as we now should have more data.
What I can say for sure is that stringable was an annoyance after it went
internal as now everything with a __toString() method had to be declared
anonymous or with it's own interface exported upfront. No big deal if you
find an internal class you can extend from and re-use it, but was not
always pretty and it's not possible to extend from Closure and apart from
that I'm not creative enough right know to remember another one with
__invoke(). (might be a non-issue with anonymous classes, so merely food
for thought, not reasoning against or for it here)
So how sharp is the axe before we start with the woodwork? (from your point
of view)
-- hakre