Re: [PHP-DEV] What about a magic __toArray() method?

  108364
February 4, 2020 12:30 rowan.collins@gmail.com (Rowan Tommins)
On Tue, 4 Feb 2020 at 12:25, Tom Gerrits <tom@inventis.be> wrote:

> "(string) $var" doesn't seem a lot less explicit to me than > "$var->toString()" >
No, but it's significantly less explicit than "$var->getDebugString()" or "$var->formatHTML()" or "$var->getRawText()", all of which might exist on one class, and any of which might be chosen as the implementation for __toString() Regards, -- Rowan Tommins [IMSoP]