On 23 January 2026 16:05:28 GMT, Larry Garfield <[email protected]> wrote: >3. Unlike the other commenters, I am 100% in favor of allowing `string` to >accept Stringable in strict mode. Strict mode basically broke Stringable, and >that's been an annoyance for a long time. I know some feel that Stringable is >always and forever a bad thing, amen, but I don't agree. It has ample valid >use cases, even if it can be abused. I want my Stringable objects back! :-)
I genuinely don't understand the reasoning here. If you want type coercion, why are you running in strict_types=1 mode? Why would you want to allow objects to be coerced, but not other values with unique, well-defined, string representations, like integers? Also, what do you mean by "strict mode broke Stringable"? Do you mean there was some code you wrote in PHP 5 that relied on implicit object-to-string conversion? It certainly wasn't called "Stringable" at the time; and it would have to have been internal functions, because users couldn't define "string" parameters. Rowan Tommins [IMSoP]
